Custom post type console errors

#4770
  • Resolved Anonymous
    Rank Math free

    Hello,

    I am encountering some js errors which block all functionalities of Rank Math in custom post types edit page.

    ajaxurl is not defined
    wp-includes/js/wp-lists.min.js

    a(...).wpList is not a function
    wp-admin/js/edit-comments.min.js

    If i insert by custom script the var ajaxurl in admin_head I get the following error:
    pagenow is not defined
    wp-admin/js/post.min.js

    As you can see these errors seem to relate to core scripts. These occur ONLY on custom post types edit page,. not in edit page for post or pages. I the normal pages/posts the gutemberg editor results active, in custom post type its isnt and the rror occurs.

    May it be related to the editor?

    Any idea on how to solve this?

    • This topic was modified 5 years, 8 months ago by .
    • This topic was modified 5 years, 8 months ago by .
    • This topic was modified 5 years, 8 months ago by .
Viewing 2 replies - 1 through 2 (of 2 total)
  • Anonymous
    Rank Math free

    Seems I resolved it by forcefully decalring in admin head the following 2 js variables:
    ajaxurl
    pagenow

    Todd
    Rank Math free

    Hi,

    I am so glad that it is sorted now.

    If you need help with anything else, please do not hesitate to ask.

Viewing 2 replies - 1 through 2 (of 2 total)

The ticket ‘Custom post type console errors’ is closed to new replies.