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.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

All other Modules /

Discuss all other Modules here.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

UserForms - Unable to add fields


Go to End


4 Posts   909 Views

Avatar
Lukereative

Community Member, 8 Posts

30 January 2013 at 11:46am

Edited: 30/01/2013 11:47am

When trying to add a field on a user form I get the error There has been a error above the add field box.
I used the Chrome dev tools and found that it is giving a javascript error

Uncaught TypeError: Cannot call method 'split' of undefined

I have confirmed that I installed the module correctly, in the root with the folder named 'userforms' and I have run a /dev/build?flush=all
Does anyone have a fix for this?
Thanks.

Avatar
Willr

Forum Moderator, 5523 Posts

9 February 2013 at 3:46pm

Try doing a flush on the userforms page

site.com/admin/edit/pageid?flush=1

That error would indicate one of the templates isn't working (doesn't have a name) so if you still have an issue after flushing, let me know what form field you're trying to add.

Also for completeness, try create a new Userform page and recreate the form and see if you get an error there.

Avatar
Lukereative

Community Member, 8 Posts

9 February 2013 at 4:39pm

It turns out that since the database/form I was using was upgraded from SS2 to SS3, the database hadn't upgraded quite right.
I managed to find and fix the problem by comparing it to a working userform on another database which directed me to the fact that there were no entries in the EditableFormField_Live Table so I fixed it by copying the rows in the EditableFormField Table to the EditableFormField_Live Table.

Avatar
Willr

Forum Moderator, 5523 Posts

9 February 2013 at 11:18pm

Must have been quite an old 2.* site, that migration took place probably 2-3 years ago now. https://github.com/silverstripe/silverstripe-userforms/blob/master/code/tasks/UserFormsVersionedTask.php is the task you need to run to republish all the form fields but sounds like you've got it sorted by hand.