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.

Customising the CMS /

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

strange message atop of the CMS


Go to End


8 Posts   1397 Views

Avatar
yurigoul

Community Member, 203 Posts

11 January 2010 at 12:31pm

Edited: 11/01/2010 2:15pm

Working on a site that works good so far but since I have put it online from time to time the following message appear in the top of my cms (I attached a screenshot) but the rest of the CMS looks fine and functions ok.

nblur) 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_EditorToolbarImageForm').validate(this); } else { return true; } } } }, '#Form_EditorToolbarImageForm select' : { initialise: function() { if(!this.old_onblur) this.old_onblur = function() { return true; } }, onblur : function() { if(this.old_onblur()) { return $('Form_EditorToolbarImageForm').validate(this); } } } }); //]]>

Anybody know what it means? Anybody seen this before?

Am working in Safari 4 at the moment. There is a mention of a calender date field in the code - which I use - does it have anything to do with it? (I will remove it and see if it comes back)

EDIT: running 2.3.4

EDIT 2: Nope, turning off the date field did not help. But I have to admit, I have hidden it, I did not remove it...

EDIT 3: until now I have not seen it in firefox 3.5.x. Could it be Safari only? (osx)

Attached Files
Avatar
MateuszU

Community Member, 89 Posts

12 January 2010 at 10:47am

Wow, that's beautiful bug :) Have you had a look at the source of the page when it happens? Can you drop it here?

Avatar
yurigoul

Community Member, 203 Posts

12 January 2010 at 1:59pm

Edited: 12/01/2010 2:27pm

I have the html source code of the admin page attached (if that is what you are looking for), I could also attach the codes of all my pages + config, but I have noticed that it is not related to a specific page - it also happened when refreshing a simple contact page for instance - and that it (so far) only hapened in Safari 4 OSX (I switched browsers, and used Firefox after that, but nothing showed).

Giving an admin?flush=all helps to let the error resurface, but then it also does not happen every time, only now and again an I could not find a certain activity that triggers it, it just happens.

The visible code showing up at the top of the the page I gave you (it showed after refreshing the simple contact page):

_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_EditorToolbarImageForm').validate(this); } else { return true; } } } }, '#Form_EditorToolbarImageForm select' : { initialise: function() { if(!this.old_onblur) this.old_onblur = function() { return true; } }, onblur : function() { if(this.old_onblur()) { return $('Form_EditorToolbarImageForm').validate(this); } } } }); //]]>

EDIT: Made an error: I uploded the wrong file. Instead I give you a screenshot of the inspector with the source code (I accidentally refreshed the page and it returned to a none error state). The error appears in the output of cms/templates/LeftAndMain.ss

Attached Files
Avatar
MateuszU

Community Member, 89 Posts

12 January 2010 at 2:36pm

Hiya,
So what's tiny_mce2? Where are you including that from?
This attachment is the page already digested by the browser, right? Can you paste the pure data returned by the webserver too?

ta

Avatar
yurigoul

Community Member, 203 Posts

12 January 2010 at 11:25pm

Edited: 13/01/2010 12:26am

Hello good morning!

TinyMCE2 is inside the jsparty folder. First thought it was DataObjectManager that was loading it but DOM has its own tinymce folder inside the module folder. It is not something I am aware of.

The section that is showing starts at line 339 (it is the only thing with '#Form_EditorToolbarImageForm select' in it)

EDIT: Yes, forgot to mention - am using DataObjectManager (that also adds stuff to leftandMain). from the config:

LeftAndMain::require_javascript("dataobject_manager/javascript/jquery-ui.1.6.js");
	LeftAndMain::require_javascript("dataobject_manager/code/date_picker_field/datepicker.js");
	LeftAndMain::require_javascript("dataobject_manager/code/date_picker_field/datepicker_init.js");
	LeftAndMain::require_css("dataobject_manager/css/ui/ui.core.css");
	LeftAndMain::require_css("dataobject_manager/css/ui/ui.datepicker.css");
	LeftAndMain::require_css("dataobject_manager/css/ui/ui.theme.css");

Avatar
MateuszU

Community Member, 89 Posts

13 January 2010 at 11:46am

Looks like Safari-specific bug. Did you replace TinyMCE? The script is loaded from jsparty/tiny_mce2/tiny_mce_src.js, and I think the original directory was tiny_mce. Looks like upon initializing TinyMCE injects some scripts into head and they get in between the other scripts that are there... try if it breaks on Chrome (which is also Webkit), or if it breaks with original TinyMCE. Or try to postpone the initialization of TinyMCE until the page is loaded, so it will not get in the way.

No more ideas here, sorry :)

Avatar
yurigoul

Community Member, 203 Posts

13 January 2010 at 10:33pm

I do not consciously load tinymce2 - but maybe it gets loaded because of the tinymce config changes that I've put in my mysite/_config - experimented a long time and it was the only thing that worked to change the settings of tinymce. I will try put that stuf at the end, for starters.

I will try chrome and report back.

Thanks for looking into it anyway :-)

Avatar
aarono

Community Member, 34 Posts

17 November 2010 at 11:52am

Did you ever figure this out? im receiving the same issue.

Im on SS 2.4

Attached Files