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.

Upgrading SilverStripe /

Ask questions about upgrading SilverStripe to the latest version.

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

Strange JavaScript error


Go to End


2 Posts   2101 Views

Avatar
Mans

Community Member, 21 Posts

12 March 2009 at 12:14am

Edited: 12/03/2009 12:15am

Hi all,

OK, I got no response on my last question, so I did some more digging. In the admin tool, a JavaScript error is triggered when I click on the page links to the left. This error stops the page from showing in the content area to the right. It first occurred after I upgraded from 2.2.3 to 2.3.

In Opera, the error message looks like this (except for the sad smiley...):

name: TypeError
message: Statement on line 685: Type mismatch (usually non-object value supplied where object required)
Backtrace:
  Line 685 of linked script http://silver.typodesign.se/assets/base.js?m=1236673810: In function processOnDemandHeaders
    function processOnDemandHeaders(xml,_ondemandComplete){var i;if(xml.getResponseHeader('X-Include-CSS')){var cssIncludes=xml.getResponseHeader('X-Include-CSS').split(',');for(i=0;i<cssIncludes.length;i++){if(cssIncludes.match(/^(.*):##:(.*)$/)){jQuery.requireCss(RegExp.$1,RegExp.$2);}else{jQuery.requireCss(cssIncludes);}}}
  Line 684 of linked script http://silver.typodesign.se/assets/base.js?m=1236673810: In function prototypeOnDemandHandler
    function prototypeOnDemandHandler(xml,callback){processOnDemandHeaders(xml,callback);}
  Line 70 of linked script http://silver.typodesign.se/assets/base.js?m=1236673810
    if(typeof prototypeOnDemandHandler!='undefined'){prototypeOnDemandHandler(this.transport,completeHandler);}else{completeHandler();}}
  Line 66 of linked script http://silver.typodesign.se/assets/base.js?m=1236673810
    this.respondToReadyState(this.transport.readyState);}
  ...  Line 29 of linked script http://silver.typodesign.se/assets/base.js?m=1236673810
    function(){return __method.apply(object,arguments);}
  ...
stacktrace: n/a; see 'opera:config#UserPrefs|Exceptions Have Stacktrace'

Can anyone make sense of this?

/MÃ¥ns

Avatar
Mans

Community Member, 21 Posts

12 March 2009 at 6:34am

I solved this. It was the FileManager module that needed upgrading.

Cheers!
MÃ¥ns