CKEditor and "TypeError: x is undefined"

2012-12-11

I’m working on a Rails project with CKEditor (I wasn’t the one who chose it.), and after upgrading Rails to use the asset pipeline, none of the CKEditor text areas would render. Firefox reported TypeError: x is undefined on a line buried deep in the wastes of minified JS. Googling turned up nothing.

Eventually I noticed we were using a custom toolbar with its own name (StoriDescription), and on a hunch I tried switching to a standard one. Everything worked! So the problem was that I had lost our custom definition by not preserving ckeditor/config.js. Once I put that file into app/assets/javascripts/ckeditor/config.js everything was well. Just thought I’d publish in case it saves someone else a few hours out there!

blog comments powered by Disqus Prev: Read-only rails_admin Next: Indexing HTML with Solr/Lucene