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.
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?
Comment | File | Size | Author |
---|---|---|---|
#12 | delta_blocks-block-caching-1346740-12.patch | 887 bytes | jrglasgow |
#11 | delta_blocks-block-caching-1346740-11.patch | 869 bytes | pbull |
#10 | delta_blocks-block-caching-1346740-10.patch | 726 bytes | pbull |
#9 | delta-blocks-pagetitle-nocache-1346740-9.patch | 8.85 KB | hitfactory |
#7 | 1346740.7-delta-tabs-no-cache.patch | 449 bytes | mrfelton |
Comments
Comment #1
marcoka CreditAttribution: marcoka commentedi think this is a drupal bug. i will monitor that.
Comment #2
marcoka CreditAttribution: marcoka commentedok funny. now, i got it that anonymous users saw the tabs (edit, view), even they had no permission. only when enabling block cache.
Comment #3
himerus CreditAttribution: himerus commentedThis 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.
Comment #4
marcoka CreditAttribution: marcoka commentedlatest release = 7.x-3.0-beta9
i have that installed
Comment #5
mrfelton CreditAttribution: mrfelton commentedthe 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).
Comment #6
mrfelton CreditAttribution: mrfelton commentedPatch attached. It doesn't need an update hook - Drupal 7 rebuild the cache settings from the _info hook when the caches are cleared.
Comment #7
mrfelton CreditAttribution: mrfelton commentedUpdated patch, applies with drush make
Comment #8
Elijah LynnI 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.
Comment #9
hitfactory CreditAttribution: hitfactory commentedAnd patch to disable caching on the Page Title block.
Comment #10
pbull CreditAttribution: pbull commentedWe 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.
Comment #11
pbull CreditAttribution: pbull commentedIt 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.
Comment #12
jrglasgow CreditAttribution: jrglasgow commentedI 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.
Comment #13
pbull CreditAttribution: pbull commentedSuccessfully tested the patch in #12 and this looks good.
Agreed that using DRUPAL_CACHE_PER_USER would be preferable for these blocks.
Comment #14
pbull CreditAttribution: pbull commented