orionjs / orioncms

[Old] Orion is an open source framework built on Meteor that makes complex as well as simple apps possible with minimal effort.
http://orionjs.org
MIT License
715 stars 129 forks source link

Summernote: "TypeError: element.code is not a function" #414

Open tomyo opened 8 years ago

tomyo commented 8 years ago

Hi, I've been getting this error when I enter the Dictionary section in the admin, it used to work fine. I tried meteor reset: nothing. I think I did a update of this package some weeks ago. I also notest the data that was inside the summernote before this error is still showing, but in the admin all I see inside is <p><br></p>, and I can't save the changes.

This is what I got: orion.dictionary.addDefinition('mainSection', 'home', orion.attribute('summernote', { label: 'Sección principal', optional: true }) );

and then in my template:

{{{ dict 'home.mainSection' }}}

This is the traceback from the browser console:

Exception from Tracker afterFlush function: undefined debug.js:43 TypeError: element.code is not a function at .<anonymous> (http://localhost:3000/packages/orionjs_summernote.js?hash=618f6d7f295fd267fbb13166cb694393c8baaa1a:164:11) at http://localhost:3000/packages/blaze.js?hash=ef41aed769a8945fc99ac4954e8c9ec157a88cea:3341:22 at Function.Template._withTemplateInstanceFunc (http://localhost:3000/packages/blaze.js?hash=ef41aed769a8945fc99ac4954e8c9ec157a88cea:3687:12) at fireCallbacks (http://localhost:3000/packages/blaze.js?hash=ef41aed769a8945fc99ac4954e8c9ec157a88cea:3337:12) at .<anonymous> (http://localhost:3000/packages/blaze.js?hash=ef41aed769a8945fc99ac4954e8c9ec157a88cea:3430:5) at http://localhost:3000/packages/blaze.js?hash=ef41aed769a8945fc99ac4954e8c9ec157a88cea:1783:14 at Object.Blaze._withCurrentView (http://localhost:3000/packages/blaze.js?hash=ef41aed769a8945fc99ac4954e8c9ec157a88cea:2214:12) at http://localhost:3000/packages/blaze.js?hash=ef41aed769a8945fc99ac4954e8c9ec157a88cea:1782:15 at Object.Tracker._runFlush (http://localhost:3000/packages/tracker.js?hash=6f5d0f5486aaa54b0abe636174eeb06dcc2a736b:525:11) at Object.Tracker.flush (http://localhost:3000/packages/tracker.js?hash=6f5d0f5486aaa54b0abe636174eeb06dcc2a736b:469:11) undefined

Packages versions:

summernote:standalone@0.8.1
orionjs:summernote@1.8.0
tomyo commented 8 years ago

I just went back to summernote:standalone@0.6.16, everything works good again. I guess is a problem with the latest (as for today) version of that package.

JeremyIglehart commented 8 years ago

Thanks, @tomyo - your hard work helped save me a lot of time.

JeremyIglehart commented 8 years ago

+1 - I'd like to use the new version of summernote

tomyo commented 8 years ago

Glad to read that, @JeremyIglehart :)

JeremyIglehart commented 8 years ago

@tomyo May I ask how you got those errors - because mine didn't error at all, it just stopped working.

tomyo commented 8 years ago

Sadly, I can't recall, but I think it was when saving, displaying or when switching from/to 'code view'. :/ PS I will keep that in mind when submitting something again.