• cant add / edit snippets wp-admin/admin.php?page=edit-snippet&id=5

    shows “wp-admin/admin.php?page=edit-snippet&id=5

    My Server Config :
    Server info: Apache
    PHP version: 7.3.23
    MySQL version: 5.7.32

Viewing 8 replies - 1 through 8 (of 8 total)
  • @manigopal – I’ve had the same problem forever on one of my setups and I finally decided to attempt to debug the issue. Maybe @bungeshea can fill in the answer after I give the details.

    Ultimately, the “false” that causes the “Sorry, you are not allowed to access this page.” to be thrown comes from line 2098 of /wp-admin/includes/plugin.php (WP version 5.5.2). The code is looking for the index “admin_page_edit-snippet” in the global $_registered_pages and not finding it.

    On an environment where I am able to edit, the same piece of code is looking for “snippets_page_edit-snippet” (note that it’s different than “admin_page_edit-snippet”) in $_registered_pages and is successfully finding it. Hence, no error.

    I’ll keep digging, however, I don’t know much about the area I’m digging into.

    Regards,
    Rob

    • This reply was modified 4 years, 4 months ago by rolevine. Reason: add WP version for file reference

    For what it’s worth, while hunting done a related problem, with another plugin, I found that a plugin “WP Custom Admin Interface” was causing my problem. I don’t know why, however, I guess I’ll stop using WP Custom Admin Interface.

    Thread Starter manigopal

    (@manigopal)

    @rolevine

    For what it’s worth, while hunting done a related problem, with another plugin, I found that a plugin “WP Custom Admin Interface” was causing my problem. I don’t know why, however, I guess I’ll stop using WP Custom Admin Interface.

    well i have de-activated WP Custom Admin Interface but nothing worked for me the same issue persists

    Plugin Author Shea Bunge

    (@bungeshea)

    Is it possible you are using a plugin to change where the Snippets menu is located in the admin menu?

    Thanks for narrowing down the issue @rolevine, I can certainly take another look at that and see about implementing a more robust solution.

    Plugin Author Shea Bunge

    (@bungeshea)

    Also @manigopal, you mention that you are unable to add snippets – does that mean you also receive an error on wp-admin/admin.php?page=add-snippet?

    Thread Starter manigopal

    (@manigopal)

    @bungeshea yes even for adding and editing previously created snippet.

    Both these shows the same error,

    admin.php?page=add-snippet

    admin.php?page=edit-snippet&id=5

    Thread Starter manigopal

    (@manigopal)

    @bungeshea any fix on this ?

    Plugin Author Shea Bunge

    (@bungeshea)

    Hi @manigopal,

    Can you confirm whether this problem is still occuring in the new release (v2.14.1)?

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Sorry, you are not allowed to access this page.’ is closed to new replies.