WordPress.org

Forums

[resolved] JS Erros on Custom Post Types (5 posts)

  1. A5hleyRich
    Member
    Posted 10 months ago #

    Hi,

    I'm getting the following errors in the JS console on custom post types add/edit screen, when the editor window is not present:

    Uncaught TypeError: Cannot read property 'top' of undefined (editor-expand.js?ver=4.0-alpha-20140709:270)
    Uncaught TypeError: Cannot read property 'hasClass' of undefined (editor-expand.js?ver=4.0-alpha-20140709:270)

    Adding the editor window to the post type resolves the issue.

    $args = array(
    	'supports'           => array(  'title', 'editor'  )
    );

    Ashley

  2. What's your full cpt code? Post it on a Gist or Pastebin please :)

    Also it SOUNDS like you're saying there are errors on the editor when you don't allow the editor window. What were you trying to do with the CPT and no editor window?

    And can you verify you're on 4.0-BETA? You listed alpha in the post, but we're on the beta so I want to be sure you're on the right version :)

  3. A5hleyRich
    Member
    Posted 10 months ago #

    Hi Mika,

    Sorry, yeah I am on the 4.0-beta. I noticed this while working on an update for Delightful Downloads. I also tested it with Simple URLs which is another plugin I know doesn't register use of the editor window.

    Ashley

  4. Using Simple URLs on trunk, with the Twenty Fourteen theme, I don't see those errors.

  5. A5hleyRich
    Member
    Posted 10 months ago #

    Weird. I've just deleted the WordPress install and re-installed the beta and everything is working fine again. Thanks for the help Mika!

    Ashley

Reply

You must log in to post.

About this Topic