• Resolved bonnerl

    (@bonnerl)


    I was getting the JS error below when trying to change between the Visual/HTML tabs.

    TypeError: f is undefined

    I’ve narrowed down the problem to being the fact that I have the SCRIPT_DEBUG PHP constant set (in my dev environment) which WordPress uses as a queue to disable concatenation of admin scripts. This was causing “hesh.min.js” to be loaded before “wp-admin/js/editor.js” which contains a dependency of your plugin (eg: window.switchEditors).

    To fix this please add ‘editor’ as a dependency of your “hesh.min.js” script. EG wp_register_script( 'heshjs', HESH_LIBS.'hesh.min.js', array('codemirror', 'editor'), $ver, true );

    Thanks!

    • This topic was modified 9 years, 6 months ago by bonnerl.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘TypeError: f is undefined – Need ‘editor’ JS dependency’ is closed to new replies.