@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