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.

Archive /

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

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

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


Reply


2 Posts   1643 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

Avatar
Andy

230 Posts

28 May 2007 at 1:59pm

Applied, thanks again! Linking to the patches is good, makes them super easy to apply :)