redactor-rails icon indicating copy to clipboard operation
redactor-rails copied to clipboard

Uncaught TypeError: Cannot read property 'msie' of undefined

Open holgersindbaek opened this issue 12 years ago • 5 comments

I followed the instructions to the point, but I keep getting this error: Uncaught TypeError: Cannot read property 'msie' of undefined

The full error is as such: Uncaught TypeError: Cannot read property 'msie' of undefined a.buildColorPicker (anonymous function) proxy jquery.js:802 jQuery.extend.each jquery.js:632 a.buildToolbar a.init a (anonymous function) jQuery.extend.each jquery.js:632 jQuery.fn.jQuery.each jquery.js:254 jQuery.fn.redactor (anonymous function) config.js:9 fire jquery.js:1018 self.fireWith jquery.js:1128 jQuery.extend.ready jquery.js:417 DOMContentLoaded jquery.js:93

If I take redactor complete away, the error disappears. Am I doing something wrong or is it an actual error?

holgersindbaek avatar Jan 27 '13 17:01 holgersindbaek

Seems that you have installed latest jQuery release (1.9) In jquery 1.9 $.browser feature is deprecated and redactor uses it somewhere. So the solution is to roll back to jquery 1.8.something

konclave avatar Jan 30 '13 18:01 konclave

Hmm... doesn't seem like the best solution, but ok. How would you roll back to 1.8 with the rails gem?

holgersindbaek avatar Jan 30 '13 18:01 holgersindbaek

You should use modernizr for detect browser.

isqad avatar Feb 03 '13 18:02 isqad

And how would I do that? Just include the modernizr library in my library and that's it?

holgersindbaek avatar Feb 06 '13 02:02 holgersindbaek

Modernizr is not your case because it's not browser detection utility but feature detection. And it won't help you because it wouldn't make redactor-rails work. At first you should determine how do you include jquery in your rails app. If it is a gem, you should set the gem version in your gemfile. If it is just an include of jquery.js in a template, you should dowload the 1.8.3 jquery and replace your current jquery.js by 1.8.3

konclave avatar Feb 06 '13 09:02 konclave