WordPress.org

Support

Support » Plugins and Hacks » ShortCodes UI » [Resolved] [Plugin: ShortCodes UI] Throwing a JS error when the editor isn't present

[Resolved] [Plugin: ShortCodes UI] Throwing a JS error when the editor isn't present

  • This plugin works very well for me most of the time, but I ran into an edge-case today: I have a custom post type that specifically doesn’t use the editor. However, ShortCodes UI is still trying to add a button to the editor, and as a result, there’s a Javascript error (edButtons not defined).

    I was able to eliminate the error by wrapping that small section of code (lines 278-286) in an if check:

    if (\'undefined\' !== typeof edButtons) {

    Let me know if you need any more info to debug (the custom post declaration, etc.), and thanks for making this plugin available. It’s been a great help in making shortcodes more useable for my clients.

    http://wordpress.org/extend/plugins/shortcodes-ui/

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘[Resolved] [Plugin: ShortCodes UI] Throwing a JS error when the editor isn't present’ is closed to new replies.
Skip to toolbar