Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
We use both the authcache and Nice Menus module. Authcache's special handling of the standard user navigation block isn't generic, so it doesn't catch the situation where the navigation block is overridden with Nice Menus. Therefore, the displayed username is often incorrect when displaying cached pages.
I quickly hacked in a solution for our specific issue to the authcache_preprocess_block() function:
else if ($variables['block']->module == 'nice_menus' && (strpos($variables['block']->subject, $variables['user']->name) != false)) {
$variables['block']->subject = '<span class="authcache-user"></span>';
}
Have you considered making the logic more generic? Should this issue be resolved permanently in the authcache or nice_menus module?
Comments
Comment #1
znerol CreditAttribution: znerol commented