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


Reply


30 Posts   8931 Views

Avatar
Double-A-Ron

Community Member, 604 Posts

29 April 2009 at 12:20am

Hi Will. I downloaded this from the 0.1 link on the module page here: [url]http://www.silverstripe.org/user-forms-module/[/url]

As for the screenshot, I posted a video of what I am seeing about 6 posts up.

Avatar
rbquirke

Community Member, 70 Posts

29 April 2009 at 5:57pm

Aaron, are you completely sure you are using version 0.1.0 and not the trunk version?
110%? Stake a case of beer on it? :)

I ask because I have just searched through the source of 0.1.0 and there is NO mention of EditableMultipleOptionField - it is only referenced in the trunk version.

You have mentioned several times that you downloaded the zip from the module page at http://silverstripe.org/user-forms-module/ - are you aware there is also a link to a zip file with the trunk version on that page also?

It really does sound to me like you are using the incorrect version and aren't listening to Willr's suggestion on this.

If I were you I would remove the userforms directory you have in a test site, go to the module page again, make sure you download the correct zip file (userforms-v0.1.0.tar.gz) and NOT the one that has any mention of "trunk" in the zip file name.

Give that a go and see what happens. If for no other reason than to prove conclusively that you really are running version 0.1.0.

Avatar
Double-A-Ron

Community Member, 604 Posts

29 April 2009 at 6:16pm

Hey mate,

Yep I'd easily stake a case of beer on having downloaded the correct userforms version 0.1.0. But I understand where you're coming from.

I have re-done every step perhaps two dozen times now, including going back to basics, deleting the archives I have on my desktop and re-downloading 5 or so times.

The interesting thing is that I seem to be able to get it working in a fresh 2.3.1 install, but not on an existing 2.2.x site with updated Sapphire, Jsparty and CMS directories from the very same 2.3.1 archive, and using the very same userforms archive.

The only other thing I can think of is some kind of caching going on. But again I have flushed and cleared the browser cache so many times now, I am really out of options in that dept unless there is another suggestion. Note I have also re produced the problem in 3 different browsers.

I re-iterate - the form for userdefinedforms is there in the CMS. I can add text fields and most of the other types. It is just Dropdowns, Options and Checkboxes that have the issue shown in my screencast - they cannot be added.

Cheers
Aaron

Avatar
rbquirke

Community Member, 70 Posts

29 April 2009 at 6:23pm

Yeah I can understand how that can get frustrating.
In my experience though, the more complex a problem appears, the more likely it is just something simple being missed.

Stay focused on the EditableMultipleOptionField - this just does not appear in the 0.1.0 code.

Try doing a search in the text of all your files in the offending website for that string and see what throws up a result.

It must be in there somewhere! Knowing where might get you on the right track.

Avatar
Howard

Community Member, 215 Posts

29 April 2009 at 10:40pm

Just throwing a spanner in the works, if your desperate to get this form going just build it in code rather than using the user defined form, if its only a simple form it'll only take half an hour to get it all up and running.

Obviously this doesn't fix the problem which should still get addressed but at least you'll have your form.

Avatar
Double-A-Ron

Community Member, 604 Posts

30 April 2009 at 11:33am

Edited: 30/04/2009 11:43am

Well, success has never felt sweeter, and I have just successfully upgraded the second 2.2.x site to 2.3.1 + userforms.

The trouble is, I can't really pinpoint what the issue is thus far, although this coincides with a Windows Disk Cleanup (the windows tool). I'm not sure if temporary files would effect the contents of a tar.gz file, and that doesn't really make sense when the different version archives are named differently anyway.

Other than that, here is a step-by-step of the process that has finally proven to work two consecutive times:

1. Delete /sapphire, /cms, and /jsparty from the 2.2.x site
2. Copy the 2.3.1 versions of /sapphire, /cms, /jsparty and /googlesitemap into the original webroot
3. Run www.domain.com/dev/build/?flush=1
4. Log into CMS, clear browser cache and run www.domain.com/admin/?flush=1
5. Copy version 0.1.0 of the userforms directory into the original webroot
6. Run www.domain.com/dev/build/?flush=1
7. Log into CMS, clear browser cache and run www.domain.com/admin/?flush=1
8. Go to existing form page in the CMS (it will appear to be a plain page now)
9. Under Behaviours, change page type to "User Defined Form" and click "Save" (Not "Save and Publish")
10. Wait for new tabs to appear and go to "Form" tab.
11. Test add new fields to form, deleting after tests.
12. Click "Save and Publish"

Both times, I was given "Javascript Error" in the notifier on that last step. I found that changing to a different page in the tree, then back again and repeating the step fixed this and it never happened again.

The above process is not all that different from what I have been attempting for 3 straight days. The two key differences is the Disk Cleanup and an extra admin ?flush command at step 4 prior to copying the userforms directory to the webroot. The SS and userforms archives used here are the exact same as the ones that failed on the last few attempts.

About to try these steps on a third site (that also previously failed) and will post the result here.

Cheers
Aaron

Avatar
Double-A-Ron

Community Member, 604 Posts

30 April 2009 at 10:25pm

Well, the third 2.2.x site is upgraded and using 0.1.0 using the exact steps above.

There is 3 more to go, and for the next one I will take step 4 out (as it appears to be the only real anomoly from what I was doing when it was failing) and see if I can replicate the problem.

If so, I will update this thread.

Thanks to all that attempted to help. As of now, it's still a mystery.

Cheers
Aaron

Avatar
Briohny

Community Member, 199 Posts

7 May 2009 at 3:21am

Edited: 07/05/2009 3:23am

Hi Double-A-Ron,

I'm having the same problem. So frustrating!!

I am running ss 2.3.1 and the latest userforms 1.0 module. Everything was working perfectly and then i decided to try and install mollom as a way of stopping spam. This then required the latest trunk of userforms as per Will's post here http://www.silverstripe.org/all-other-modules/show/258322#post258322

It didn't really seem to work, so i then decided to delete all the mollom files and replaced the trunk userform module with the original 1.0 version that i had used.

This has now given me a dropdown and checkboxes problem. When i try to insert a dropdown menu or checkboxes item it says 'adding new field' and then 'added new field' However i can't see the new field and so i can't enter any data. It also doesn't exist when the page is published. Exactly what happened to you in your video.

I have tried your fix, but it's still not working. I even tried a fresh install and just moved my mysite files and database across. Still doesn't work. Do you have any other suggestions? It's driving me nuts and I have wasted so much time trying to fix!