• Resolved nwjames

    (@nwjames)


    I had the plugin activated, but was not particularly using it. I was testing my own plugin to deliberately disallow access and get a page not found error.

    The issue is within your routine edac_enqueue_scripts in includes/enqueue_scripts.php

    If the global $post is null, then it sets $post_id to null.

    Then it calls current_user_can( 'edit_post', $post_id )

    When outputting the expected 404 page, I get this debug message:

    Notice: Function map_meta_cap was called incorrectly. When checking for the edit_post capability, you must always check it against a specific post. Please see Debugging in WordPress for more information. (This message was added in version 6.1.0.) in /usr/share/wordpress/wp-includes/functions.php on line 5905

    Deactivating your plugin made the message disappear.

    Hope this is of use,

    Neil James

Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Problem when displaying a Not Found (404) page’ is closed to new replies.