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.
Hi,
Thanks for Masquerade! It really helps with testing different user roles.
I've added Masquerade block and I've noticed that it's not updated properly. I am guessing this is caused by the fact that Drupal automatically cache block per role when block caching is turned on. Installing Block Cache Alter and disable caching for Masquerade block seems to fix the problem. This probably should be added to the document.
Comment | File | Size | Author |
---|---|---|---|
#2 | 364255_block_cache_per_user_2.patch | 1.07 KB | deviantintegral |
#1 | 364255_block_cache_per_user.patch | 1.57 KB | deviantintegral |
Comments
Comment #1
deviantintegral CreditAttribution: deviantintegral commentedI've attached a patch which sets the block cache to be per user, and not the default of per role. It also clears the block cache whenever the Masquerade settings are changed, so that updates to the permissions or quick switch lists are shown immediately.
Per-role caching would have caused problems with #290313: Limit to relative users down the line as well.
Comment #2
deviantintegral CreditAttribution: deviantintegral commentedHere is a slightly rerolled patch which I'll be committing in a moment.