madeyourday / contao-rocksolid-custom-elements

RockSolid Custom Elements Contao Extension
http://rocksolidthemes.com/de/contao/plugins/custom-content-elements
MIT License
48 stars 12 forks source link

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

Closed biowebfr closed 6 months ago

biowebfr commented 6 months ago

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 :)

lukasbableck commented 6 months ago

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

ausi commented 6 months ago

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

lukasbableck commented 6 months ago

Yes, works for me

biowebfr commented 6 months ago

Good job ! Thanks a lot.

ausi commented 6 months ago

Released as version 2.4.9.