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.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Javascript in head of CMS


Go to End


4 Posts   1866 Views

Avatar
aarono

Community Member, 34 Posts

18 November 2010 at 4:49pm

Hi guys

Im getting a very odd issue when using Safari (Firefox, Chrome and IE seem to be fine). If i login to the cms, then jump from section to section (Files & Images, Custom ModelAdmin), sometimes I will get a block of JS appear at the top:

his.validate(); } }, '#Form_EditForm input' : { initialise: function() { if(!this.old_onblur) this.old_onblur = function() { return true; } if(!this.old_onfocus) this.old_onfocus = function() { return true; } }, onblur : function() { if(this.old_onblur()) { // Don't perform instant validation for CalendarDateField fields; it creates usability wierdness. if(this.parentNode.className.indexOf('calendardate') == -1 || this.value) { return $('Form_EditForm').validate(this); } else { return true; } } } }, '#Form_EditForm textarea' : { initialise: function() { if(!this.old_onblur) this.old_onblur = function() { return true; } if(!this.old_onfocus) this.old_onfocus = function() { return true; } }, onblur : function() { if(this.old_onblur()) { return $('Form_EditForm').validate(this); } } }, '#Form_EditForm select' : { initialise: function() { if(!this.old_onblur) this.old_onblur = function() { return true; } }, onblur : function() { if(this.old_onblur()) { return $('Form_EditForm').validate(this); } } } }); //]]>

I have tracked this down to being inside sapphire/forms/Validator.php, but I cant figure out why it would print to the browser.

Anyone run into this issue or have any ideas?

Screenshot attached.

Thanks
Aaron

Attached Files
Avatar
aarono

Community Member, 34 Posts

22 November 2010 at 11:45am

Anyone?

Avatar
neilcreagh

Community Member, 136 Posts

4 April 2011 at 11:55pm

I saw this message from Willr on another post "Make sure all your files uploaded successfully and then try reload the cms - yoursite.com/admin?flush=1"

The message disappeared for me when I flushed the admin section.

Avatar
aarono

Community Member, 34 Posts

5 April 2011 at 8:41am

Yea it does go away if you flush, but it will come back after a few clicks (I dont want to make my clients flush=1 every time).