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've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Archive /

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

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

Patch: Fix 'Undefined variable: js' error after Page Reorganise


Go to End


2157 Views

Avatar
elijahlofgren

Google Summer of Code Hacker, 222 Posts

17 May 2007 at 9:08am

I get this error when I click the "Reorganise" tab and move a page to be the child of another page.

Error in Ajax evaluator on line 974: invalid flag after regular expression
Notice: Undefined variable: js in /var/www/silverstripe/cms/code/LeftAndMain.php on line 577
if( $('sitetree').selected && $('sitetree').selected[0]){ var idx = $('sitetree').selected[0].getIdx(); if(idx){ $('Form_EditForm').getPageFromServer(idx); } } $('sitetree').setNodeTitle(5, "New Page1") statusMessage('saved', 'good');

This 1 line change initializes the $js variable to prevent this error:
http://www.elijahlofgren.com/silverstripe/patches/Fix-undefined-var-js-silverstripe.2.0.DailyBuild.2007-05-16.patch

Let me know if you'd rather I just paste these 1 line patches instead of linking them. I don't want to be too much of a bother with these minor undefined variable fixes. ;)

- Elijah