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:

Archive /

Our old forums are still available as a read-only archive.

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

"Fields_fields" has no properties

Go to End

3 Posts   1524 Views


Community Member, 94 Posts

7 June 2007 at 9:31am

Edited: 07/06/2007 9:31am


create a new contact form, do not change anything, just click "Form" tab. Then go to any other (plain) page, make some changes and do 'Save Draft'. The draft is not saved and in the Error console is:

Error: $("Fields_fields") has no properties
Source File:
Line: 33

I use FF The following patch seems to solve this problem for me.

--- FieldEditor.js.orig 2007-06-07 09:22:20.000000000 +1200
+++ FieldEditor.js 2007-06-07 09:25:00.000000000 +1200
@@ -29,14 +29,17 @@
beforeSave: function() {
+ var fieldEditor = $('Fields_fields');
+ if(fieldEditor) {
+ var children = fieldEditor.childNodes;

- var children = $('Fields_fields').childNodes;
- for( var i = 0; i < children.length; ++i ) {
- var child = children;
+ for( var i = 0; i < children.length; ++i ) {
+ var child = children;

- if( child.beforeSave )
- child.beforeSave();
+ if( child.beforeSave )
+ child.beforeSave();
+ }


Forum Moderator, 922 Posts

7 June 2007 at 1:49pm

This is good - the problem is there's a bunch of JS files in SilverStripe that haven't had any if() blocks wrapped around assumptions that these variables exist.

I'll take note of this, and make sure this reaches either our next release (2.0.2) or the one after that, but I don't see it being a huge change that's going to be causing bugs all over the place. :-)



Community Member, 94 Posts

3 July 2007 at 7:23pm

Hm, I see the problem is more deeper, so my fix as just workaround, not the real fix. There's an observeMethod('BeforeSave'...) and this observation has to be stopped, when the user clicks to another page.