Hi,

I'm getting an odd error using this module. When I'm logged in as an authenticated user and I go to a node that I've published there are usually three tabs (view, edit, and publish). When I first load the page the edit tab is there, but after a second or two it disappears/collapses. When I disable the module, this problem goes away.

Besides this, the module is working correctly for authenticated users and at the bottom of my page source I can see that authcache is working.

Any ideas anyone? I'm stuck on this one...

-CarbonPig

http://carbonpig.com

Comments

Jonah Ellison’s picture

Hi CarbonPig, what module are you using that creates the "Publish" tab? (I want to test it out.) Authcache tries to dynamically create/hide tabs based on role permissions, so there may be some glitch during this process.

vood002’s picture

Subscribing.

A user of my site reported behavior exactly as described here, although I'm unable to recreate this when logged in to a cached account.

sanderz’s picture

I'm experiencing the same problem. For me this occurs in combination with the node access module. When a certain role is granted edit permissions on a node, only the "real author" can use the edit tab. For all other users within the same role, the tabs disappear after 1-2 seconds.

Note: it does take a slow browser (IE) to actually see this happening, in Safari I don't even see the tabs appearing :)

Any idea how to solve this?

bryancasler’s picture

Same thing happening here, this is a killer bug.

The following you see on page load.

<div class="local-tasks"><span id="authcache-tabs"><ul class="tabs primary">
<li class="active"><a href="/news/wikileaks-baghdad" class="active">View</a></li>
<li><a href="/node/807/edit">Edit</a></li>
</ul>
</span></div>

after a second or so later the local tasks disappear and are replaced with this

<div class="local-tasks" role="navigation" id="mf517"><span id="authcache-tabs">
</span></div>
bryancasler’s picture

I also looked at the page source and found this at the bottom

<!-- Authcache Footer JSON --> 
<script type="text/javascript"> 
var authcacheFooter = { "info": { "page_render": 3867.54, "page_queries": "552 queries @ 463.52 ms (12%)", "cache_render": "-1", "cache_uid": "646", "cache_inc": "cacherouter.inc (db)", "cache_time": 1285438992, "node_author": "Bryan Casler", "tab_hide": [ "Edit" ] }, "ajax": { "q": "node/807", "node_history": "807", "statistics": 1 } };
</script> 

The is what I get when logged in as the "Bryan Casler" account. I'm guessing the "tab_hide": [ "Edit" ] has something to do with all this.

igor.ro’s picture

This code would not works.

/**
 * Render primary & secondary tabs.
 * Response will be cached.
 * @see menu.inc
 */.
function _authcache_menu_local_tasks($vars) {
  drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
  return theme('menu_local_tasks');
}

Because we have send ajax request to the {base_url}/index.php
And there is no local task for edit node.
We have to implement in authcache 2 mechanism for url dependent content,
Or write a plugin to easy authcache module that is now on stage adding to community http://drupal.org/node/916742.
I'm open to help you, feel free to contact me.

bryancasler’s picture

Has anyone else had this problem or is it just me?

igor.ro’s picture

As I reported I have.
Because code to get menu contains bug.

elax’s picture

Issue summary: View changes

I have the same problem using Drupal commerce. Edit/View/etc ... tab disappear on Node and on menu page (using tabs for submenu).

znerol’s picture

@elax: This issue is for 6.x-1.0-rc1. Drupal Commerce is not available for Drupal 7, therefore it is very unlikely that you are using Authcache 6.x. If you have problems with a different version of Authcache, then please file a new support request.

znerol’s picture

Status: Active » Closed (outdated)