Serious issue: access denied

drupalzack - August 17, 2007 - 14:00
Project:pathmenu
Version:4.7.x-1.1
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:active
Description

Sorry for marking this critical, but it took me a very long time to figure this one out. Here's what was happening:

Some nodes would suddenly have access denied messages displayed to anonymous users only and this would happen arbitrarily and automatically rectify itself! Tore my hair out trying to figure out why or when this would happen or why it got resolved by itself!

Here's what was happening.
Create a custom node (I think this bug will manifest on any node type not just custom nodes). Let's call it content_custom
Create a primary menu called custom
Create a pathmenu rule: nodetype(content_custom)->parentpath(custom)
So anytime a node of type custom is viewed, it is attached to the menu custom
So far this should work fine

Now, open another browser (not another instance of same browser, but another browser. If you used FF for above, use Opera here)
View your site as an anonymous user
View a node of type custom
Again, you should be able to view the node, and be able to see that it is attached to parent menu custom

Now go back to the first browser where you are logged in as admin
Click on admin..menu

Now, go back to the second browser where you are not logged in
Refresh the custom node you were viewing
You'll get Access Denied. You are not authorized to view this page!

To resolve this, all you have to do is click on any admin menu and then click on admin..menu.

The reason this happens is, when you click admin..menu, it clears the admin cache and that interferes with pathmenu.

Took me a long while to figure this out. But this is what is essentially happening.

If you need further info, please respond. I'll be actively monitoring this thread.

Thanks,
Zack

 
 

Drupal is a registered trademark of Dries Buytaert.