• Resolved A5hleyRich

    (@a5hleyrich)


    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

Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    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 🙂

    Thread Starter A5hleyRich

    (@a5hleyrich)

    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

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

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

    Thread Starter A5hleyRich

    (@a5hleyrich)

    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

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘JS Erros on Custom Post Types’ is closed to new replies.