I'm not sure what is causing this but when I add my GEOURL in the settings. '41.876899, -87.624283' it removes all of my view/edit tags on all node types except for page node types.

Comments

Robrecht Jacques’s picture

Assigned: Unassigned » Robrecht Jacques
Priority: Normal » Critical

My god, you're right!

Setting to "Critical".

In my case, both page and story nodes are affected.
The tabs (edit/view) only disappear when entering a GeoURL, not with the other tags.

I have a sneaky suspicion this has to do with the DC.title tag (eg the call of drupal_get_title() to construct it). But I'll have to investigate this closer tomorrow.

Robrecht Jacques’s picture

Status: Active » Fixed

Fixed in 4.7.

Note that you need to run update.php from "administer >> modules" because for this fix requires that the cache is cleared.
BTW: the instruction to run update.php after each new version of this (or any other module) is documented in README.txt, but I'm telling you anyway coz noone reads that.

Some information for the interested parties:

the problem is with calling drupal_get_title() (for the DC.title tag) in hook_menu(!$may_cache). Because we're still early in the boot process at that time, drupal_get_title() will call menu_get_active_title(). This on turn calls menu_set_active_item() which stores what it finds in a static variable. Unfortunately, the menu's are not complete at that time, more precisely, the local tasks (tabs) for editing/viewing/... nodes are not yet in place. So menu_set_active_item() sets the static variable to something incomplete and subsequential calls to menu_get_active_item() will return that wrong menu item which has no tabs.

BTW: the DC.title was set to "content" all the time for nodes, so that was wrong also (although it shows it correctly in the meta tags block coz by then drupal_get_title() will return the right one).

So in summary:
- don't call drupal_get_title() in hook_menu(!$may_cache),
- we call our stuff from hook_footer() now, which even has the extra benifit that things are now cached (for anonymous users),
- this is the reason why cache_clear_all() needs to be called, as in the already cached pages, the tags will not have been set,
- "Doctor, it hurts when I do this ... well, don't do it then!".

Anonymous’s picture

Status: Fixed » Closed (fixed)