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.


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

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

"Fields_fields" has no properties


3 Posts   1273 Views


7 June 2007 at 9:31am (Last edited: 7 June 2007 9:31am), Community Member, 94 Posts


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();
+ }


7 June 2007 at 1:49pm Forum Moderator, 921 Posts

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. :-)



3 July 2007 at 7:23pm Community Member, 94 Posts

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.