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, sorry for my bad english.
I have 2 different context that place the same block with different configuration (for example 2 different class) in 2 different page, so:
Context A: condition: page_A reaction block: some_block class: class_A Context B: condition: page_B reaction block: some_block class: class_B
if I flush cache and visit page_A, some_block is cached and now, both on page A and B, it will have the class_A
if I flush cache and visit page_B, some_block is cached and now, both on page A and B, it will have the class_B
this issue is related to #2918775: class in block configuration doesnt render in markup
in the next comment a proposed patch that add also the machine_name of the context to the cache key
Comment | File | Size | Author |
---|---|---|---|
#2 | context-cache_collision_block_configuration_not_respected-2976587-2.patch | 857 bytes | robertom |
Comments
Comment #2
robertom CreditAttribution: robertom at bmeme commentedComment #3
robertom CreditAttribution: robertom at bmeme commentedComment #4
George Bills CreditAttribution: George Bills commentedI've hit the same issue on my site, this time with 4 blocks on the same page, with 4 different configurations. I end up with 4 copies of exactly the same block. The issue only affects me if I add the 4 blocks via Context, not if I add them via /admin/structure/block/. The patch in #2 fixed the issue for me (along with ticking that "unique placement" checkbox that I never really understood until now).
Comment #5
George Bills CreditAttribution: George Bills commentedComment #7
boshtian CreditAttribution: boshtian at Agiledrop - Your Trusted Drupal Teammates commented