Download & Extend

Nodequeue tab on nodes even though they are disabled

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

Status:active» needs review

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?

AttachmentSizeStatusTest resultOperations
nodequeue-use-tab-277867.patch1.53 KBIgnored: Check issue status.NoneNone

#4

#5

Status:needs review» needs work

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

Status:needs work» needs review

I think we got it here.

AttachmentSizeStatusTest resultOperations
nodequeue_tab.patch2.04 KBIgnored: Check issue status.NoneNone

#8

Status:needs review» active

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

Status:active» fixed

Fixed as part of #278609: Forward port Modular Access Control to 6.

#10

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.