madeyourday/contao-rocksolid-custom-elements

Last update > Error with CustomElement.php > $this->addFragmentControllerDefaults();

Closed this issue · 5 comments

Hi!

I customized the rsce_oneo_headline_box.html5 adding "inputUnit" on headline:

'mainheadline' => array(
   'label' => array(
     'en' => array('Headline', ''),
     'de' => array('Überschrift', ''),
     'fr' => array('Titre', ''),
   ),
'inputType' => 'inputUnit',
    'options' => array('h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'div', 'span'),
    'eval' => array(
    'tl_class' => 'w100',
   ),
),

Since last update I get the following error when $this->addFragmentControllerDefaults(); is not commented (no error when commented):

Argument 1 passed to class@anonymous::__construct() must be of the type string or null, array given, called in D:\wamp64\www\a-propos\vendor\madeyourday\contao-rocksolid-custom-elements\src\Element\CustomElement.php on line 301

Capture d'écran 2024-02-29 115746

Can you tell me if I'm doing something wrong with 'inputType' => 'inputUnit'?

Thank you :)

I have the same problem and opened a PR with a patch that fixes the problem for me

ausi commented

@biowebfr @lukasbableck can you please verify if the latest dev-master version works correctly?

Yes, works for me

Good job ! Thanks a lot.

ausi commented

Released as version 2.4.9.