Home Forums Backend Issues (wp-admin) n.getBody is not a function


n.getBody is not a function

  • Hi,

    When I load the post page, I get this error in Firebug. Everything seems to work normally beside I can’t insert media to post. The media modal would open normally and I can select/upload pictures, but when I choose and click on “Insert into post” the modal would close and picture is not added into the textarea.

    TypeError: n.getBody is not a function

    It’s coming from input.min.js (which seems related to acf)

    /* **********************************************
    Begin acf.js
    ********************************************** *//*

    I have the latest WordPress version and latest plugin version.

  • Hi @standish

    Thanks for the bug report. Can you edit the acf.php file and search for input.min.js and change it to input.js

    Then, when the error occurs in your console log, can you please specify the line number?


  • Hi @elliot,

    Alright, here we go:

    TypeError: editor.getBody is not a function
    $body = $( editor.getBody() ); (line 3790)

    The first error happens on pageload.

    The other errors are when I’m trying to insert the picture into the post.

    I’ve attached a Firebug screenshot.

    Let me know if you need more information.

    Thanks for your time and support,

    All the best,

  • Hi @standish

    Thanks for the bug report. A few lines above the cause of the error is a validation statement which looks like:

    // validate
    if( !editor )

    Could you please console.log the editor variable before this statement? It should not be getting passed this statement but if it is, I would like to know what editor is.


  • Hi @elliot,

    Thanks for quick reply.

    Here’s a screenshot of the object.

    Let me know if you need anything else.


  • Hi @standish

    Thanks for the screenshot. I’ll do some debugging and make sure this function exists.

    Can I ask if you have any plugins which would modify the tinyMCE object?


  • Hi,

    Yes I’m using Ether Builder which probably modify the TinyMCE editor.

    If I disable the plugin, everything work as it should.t

    I can send a copy of the plugin if you need to.

    Thanks for your time,

  • Hi @standish

    Just to clarify, this is not an issue with ACF, but a compatibility issue between ACF and the Ether Builder plugin.

    Can you please also contact the developer of this 3rd party plugin?

    I’ll have a look at the issue, but can’t add this to-do with a high priority as it is not an issue with the core.

    Thanks for understanding


  • Totally understood. I will contact the plugin developer directly.

    Thanks for taking time,

Viewing 9 posts - 1 through 9 (of 9 total)

The topic ‘n.getBody is not a function’ is closed to new replies.