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

coltrane’s picture

Would a variable_get() around the nodequeue tab item in hook_menu() do the trick?

coltrane’s picture

I tried this, but no it doesn't seem to be enough. Likely because of menu caching ... hmmn.

coltrane’s picture

Status: Active » Needs review
StatusFileSize
new1.53 KB

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?

ezra-g’s picture

ezra-g’s picture

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.

ezra-g’s picture

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.

ezra-g’s picture

Status: Needs work » Needs review
StatusFileSize
new2.04 KB

I think we got it here.

ezra-g’s picture

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.

ezra-g’s picture

Status: Active » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)

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