Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted October 9, 20204 yr I've had a custom widget where the code for the configuration-method contains a header. This works in 4.4, but in 4.5 it fails (at least when IN_DEV is active). <? public function configuration( &$form=null ) { if ( $form === null ) { $form = new \IPS\Helpers\Form; } $form->add( … ) … $form->addHeader('livefeed_forumsettings'); $form->add( … ); … return $form; } The error is: Trying to get property 'name' of non-object And is caused by the logic in applications/core/dev/html/front/widgets/formTemplate.phtml: {{if $input->name and \mb_substr( $input->name, 0, 12 ) != 'widget_adv__' and ! \in_array( $input->name, $visibilityFields )}} Fixing that specific check it'll fail other places though. So some bugs for you to quash 🙂 For now I guess I'll just remove the form header from the form, while I await your fix, unless you want us to sectionize widget settings in a different way than this. Edited October 9, 20204 yr by TSP