If you activate all caching features of drupal + block caching. The main page title block behaves weird. In my case it shows the title of the first page i landed on, across other pages (menaing title stays the same).

Anyone ever experienced such issues?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

marcoka’s picture

Status: Active » Needs review

i think this is a drupal bug. i will monitor that.

marcoka’s picture

ok funny. now, i got it that anonymous users saw the tabs (edit, view), even they had no permission. only when enabling block cache.

himerus’s picture

This shouldn't be happening in the latest release.

I fixed the caching settings for certain delta_blocks items... including the page tilte, messages, tabs, and something else, I forget which.

marcoka’s picture

latest release = 7.x-3.0-beta9
i have that installed

mrfelton’s picture

Status: Needs review » Needs work

the tabs block is set to DRUPAL_CACHE_PER_PAGE, which I think it's wrong. Sure the tabs are completely dependent on who is viewing, therefore it should be DRUPAL_NO_CACHE. Also, I think you need an update hook to fix the problem for people who have already installed the module, as because (I think - in D6 anyway) the cache setting is only set once on install. That may have changed in D7).

mrfelton’s picture

Status: Needs work » Needs review
FileSize
573 bytes

Patch attached. It doesn't need an update hook - Drupal 7 rebuild the cache settings from the _info hook when the caches are cleared.

mrfelton’s picture

Updated patch, applies with drush make

Elijah Lynn’s picture

Version: 7.x-3.0-beta9 » 7.x-3.0-beta11

I am getting anonymous and authenticated users seeing tabs they shouldn't. Anon users get access denied message and flushing cache resolves this issue but a regular auth user is seeing the "manage display" tab and he gets access denied message. In addition, that user has view, revert permissions even though there are no such permissions assigned.

update: rebuilding permissions (/admin/reports/status/rebuild) does resolve the issue.

hitfactory’s picture

And patch to disable caching on the Page Title block.

pbull’s picture

Version: 7.x-3.0-beta11 » 7.x-3.x-dev
FileSize
726 bytes

We are seeing this issue on /user when exposing Breadcrumb and Page Title as delta blocks. The page title and breadcrumbs are being cached with the username of the first user to visit /user, and subsequent visitors (including anonymous visitors) see the first user's name.

Changing the cache settings from DRUPAL_CACHE_PER_PAGE to DRUPAL_NO_CACHE for the page-title and breadcrumb blocks resolves this issue.

Attaching cleaned up patch.

pbull’s picture

It was also noted that the tabs block can also be cached in this same matter, and that in one case this was causing view/edit/revisions tabs to be displayed to anonymous users after a content editor had visited a given page and the block was cached with those tab links. (Although the anonymous users could not access the edit links, this is not ideal.)

Attaching updated patch to set DRUPAL_NO_CACHE on tabs block as well.

jrglasgow’s picture

I think using DRUPAL_NO_CACHE may be going a bit too far.

Wouldn't using DRUPAL_CACHE_PER_USER be as effective. Since the /user page when users aren't logged out would still be cached for user 0.

I have attached a patch with the DRUPAL_CACHE_PER_USER option.

pbull’s picture

Successfully tested the patch in #12 and this looks good.

Agreed that using DRUPAL_CACHE_PER_USER would be preferable for these blocks.

pbull’s picture

Issue summary: View changes
Status: Needs review » Reviewed & tested by the community