Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Form Questions

Fatal error: Call to a member function Name() on a non-object in ..../sapphire/forms/FieldSet.php on line 393


Go to End
Reply

30 Posts   8487 Views

Avatar
Yulia

4 April 2009 at 3:57am Community Member, 26 Posts

Fatal error: Call to a member function Name() on a non-object in ..../sapphire/forms/FieldSet.php on line 393

any ideas why?

Avatar
Willr

4 April 2009 at 6:33pm Forum Moderator, 5511 Posts

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

Avatar
Victor

7 April 2009 at 4:14am Community Member, 128 Posts

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

Avatar
Double-A-Ron

27 April 2009 at 12:22pm (Last edited: 27 April 2009 12:24pm), Community Member, 604 Posts

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

Avatar
Double-A-Ron

27 April 2009 at 12:29pm Community Member, 604 Posts

Duplicated on a second SS site with the same SS and userforms setup, but on a different box.

Avatar
Willr

27 April 2009 at 12:35pm Forum Moderator, 5511 Posts

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.

Avatar
Double-A-Ron

27 April 2009 at 1:12pm Community Member, 604 Posts

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

Avatar
Double-A-Ron

27 April 2009 at 2:12pm Community Member, 604 Posts

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???

Go to Top