Jump to:

5513 Posts in 1732 Topics by 1218 members

Customising the CMS

SilverStripe Forums » Customising the CMS » strange message atop of the CMS

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

Page: 1
Go to End
Author Topic: 1015 Views
  • yurigoul
    Avatar
    Community Member
    202 Posts

    strange message atop of the CMS Link to this post

    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
  • MateuszU
    Avatar
    Community Member
    89 Posts

    Re: strange message atop of the CMS Link to this post

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

  • yurigoul
    Avatar
    Community Member
    202 Posts

    Re: strange message atop of the CMS Link to this post

    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
  • MateuszU
    Avatar
    Community Member
    89 Posts

    Re: strange message atop of the CMS Link to this post

    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

  • yurigoul
    Avatar
    Community Member
    202 Posts

    Re: strange message atop of the CMS Link to this post

    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");

    Attached Files
  • MateuszU
    Avatar
    Community Member
    89 Posts

    Re: strange message atop of the CMS Link to this post

    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

  • yurigoul
    Avatar
    Community Member
    202 Posts

    Re: strange message atop of the CMS Link to this post

    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

  • aarono
    Avatar
    Community Member
    34 Posts

    Re: strange message atop of the CMS Link to this post

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

    Im on SS 2.4

    Attached Files
    1015 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.