Support » Plugin: Simple Fields » [Plugin: Simple Fields] Cannot read property 'canvas' of undefined with TinyMCE

  • Resolved mookasaurus


    After upgrading to WordPress to 3.3, I got this error:

    Uncaught TypeError: Cannot read property ‘canvas’ of undefined

    I only get this error when I’m on the edit page with simple fields textarea that has TinyMCE, no Javascript works on that page. When I disable the TinyMCE (uncheck Use HTML-editor in the settings), the error is gone.

    Other people don’t seem to have this problem so I’m wondering if there’s anything I missed. Any suggestion would be appreciated. Thank you so much in advance!

Viewing 10 replies - 1 through 10 (of 10 total)
  • mookasaurus – I’m running into the same error. Thanks for the point about unchecking the Use HTML-editor. I’ll use that until I can find a solution or get an update.

    Thank you for your confirmation, idowning. The error is not good but It’s good to know I’m not the only one getting it 😉

    I really want to upgrade to 3.3 but I also need the editor for the repeatable fields so for now I guess I’m stuck with 3.2.1.

    My JS knowledge is very limited but I’ve investigated and it seems like in scripts.js, line 564, something doesn’t like this line:


    I guess disabling this line gives the same result as unchecking the Use HTML-editor checkbox because the error is gone with the editor. Anyway, I say it just in case it might be useful for someone who can fix it.

    Thank you again in advance!


    I’ll look into the js elements and see if I can’t find something.

    I also ran into another error where in the content it doesn’t allow you to select an image from the media gallery.

    Hope a fix comes soon.

    idowning, Have you seen this post about the media gallery upload?

    Still no luck with the TinyMCE. It’s likely I will have to look for an alternative plugin 🙁

    Alright, after spending almost all day with some research, I guess the issue has something to do with the new API. My knowledge is very limited so I’ll wait for the new Simple Fields update.

    Meanwhile, I’ve come up with a quick fix that I’d like to share, just in case someone need to have WP latest version running with TinyMCE in Simple Fields like me.

    I uncheck “Use HTML-editor” check box and add manually add TinyMCE using the snippet from the tutorial here:

    Paste the code in functions_post.php, under the close bracket of “echo $media;”

    Then TinyMCE should appear, and you’ll run into another problem when trying to insert an image from the library but thanks to cm258 from this post:

    The thing is, in WordPress 3.3, wp_tiny_mce() is deprecated so I’m not very happy with this dirty fix but it’s working so far so hopefully the real fix from Simple Fields will come out soon.

    Thanks to Pär Thernström for the great plugin though!

    mookasaurus great workaround! Yes the plugin still needs to be fixed, but I for one am very thankful you figured out a way to get it working.


    I’m glad it’s helpful 🙂

    Same problems here.
    I must add on the developers website he has a note here

    I saw on his twitter page that he had been given donations by some people but they were very small. Apparently he is from Sweden and it’s very expensive to live there (like anywhere these days!!)

    I’m sure if more of us can donate he will update the plugin. He said he’ll definitely do it, but doesn’t know when.
    It’s an awesome plugin and if he’s reading this, we all totally appreciate your work.

    I also hope for a update. I just emailed Pär (the maker) if he can give us any update.

    I also see the “Uncaught TypeError…” in WordPress 3.3.1 + SimpleFields 0.4:

    Uncaught TypeError: Cannot read property 'canvas' of undefined (
    	qt.closeAllTags (
    	switchEditors.go (
    	simple_fields_metabox_tinymce_attach (scripts.js:53)
Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘[Plugin: Simple Fields] Cannot read property 'canvas' of undefined with TinyMCE’ is closed to new replies.