Fatal error: Call to a member function Name() on a non-object in ..../sapphire/forms/FieldSet.php on line 393
any ideas why?
This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.
Please use forum.silverstripe.org for any new questions
(announcement).
The forum archive will stick around, but will be read only.
You can also use our Slack channel
or StackOverflow to ask for help.
Check out our community overview for more options to contribute.
Fatal error: Call to a member function Name() on a non-object in ..../sapphire/forms/FieldSet.php on line 393
any ideas why?
Have you got more information? where are you getting this error or the code you are using to produce this?.
Judging from the error it would look like one of your form fields does not have a name attached to it - eg in a form you do new TextField('NameOfTheField')
My experience is that it happens when DataObject::get returns empty and then I try to merge to it or to sort it:
My remedy is
$results = new DataObjectSet();
$results1 = DataObject::get(...); // what used to be $results
$results->merge($results1);
I am getting exactly the same error when upgrading an existing site to SS 2.3.1 and UserForms 1.0.
It only occurs on the contact form pages that used to be the old built-in User Defined Form page types.
Dev/build and flushed to hell, no change. isDev=1 displays nothing more.
Any further ideas in this scenario?
Aaron
Duplicated on a second SS site with the same SS and userforms setup, but on a different box.
And different forms? Eg try a basic 1 field form? Try and cut it down to if its 1 form field or all of them. We are about to release an update to userforms 0.1, but the current one should work.
Ah I see.
It was two dropdowns that I had there from the orignal site. I went into the CMS and where the other field types had an icon denoting their type, these dropdowns just had text that said "EditableField". Removed them and added them again using the controls and all is well.
Cheers
Aaron
Spoke too soon.
Trying to add a dropdown, radio, or checkboxes in the CMS does nothing. It looks like a blank DIV is added to the form on the CMS side, but no icon, no label field, no nothing.
flush=1, cleared cache. All done. No help.
This is getting rediculous. 6 hours (and counting) to get a contact form on a website???