Posted by coltrane on July 2, 2008 at 8:31pm
2 followers
| Project: | Nodequeue |
| Version: | 7.x-2.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
I've unchecked the admin setting "Create a menu tab for each node that could belong to any queues" and I have no nodequeues at the moment but there is still a Nodequeue tab on my nodes. Am I mistaken on what the setting does? There is no use of the variable nodequeue_use_tab outside of nodequeue_admin_settings() that I can see.
Comments
#1
Would a variable_get() around the nodequeue tab item in hook_menu() do the trick?
#2
I tried this, but no it doesn't seem to be enough. Likely because of menu caching ... hmmn.
#3
If the cache is cleared problem is solved. So, patch attached wraps the menu item in a variable_get() on nodequeue_use_tab. What's preferred, on submit of the admin setting do menu_rebuild() or tell the user (dsm or otherwise) to clear the cache themselves?
#4
#289683: Queue Names Missing in node-edit-tab and #281040: Subqueue name changes don't affect individual subqueues may be symptoms of the same problem that this patch addresses.
#5
While this patch should address cases where the site-wide setting is not observed, it does not resolve individual nodes that have tabs even though they are not eligible for any queues. That's because nodequeue_node_tab is being called regardless of whether a node is eligible.
#6
I rerolled this and defined a custom nodequeue_node_tab access callback, which took care of the problem in more cases, however the tab still lingers in the menu cache after a node has become ineligible. We'll need to make this callback non-cache-able.
#7
I think we got it here.
#8
The solution to this involves writing a new access callback function, and should have been incorporated into #278609: Forward port Modular Access Control to 6 . I will re-roll that patch to include this solution. Leaving this issue open as the bug described here is not a dupe.
#9
Fixed as part of #278609: Forward port Modular Access Control to 6.
#10
Automatically closed -- issue fixed for two weeks with no activity.