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

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

robertom created an issue. See original summary.

robertom’s picture

Status: Active » Needs review
FileSize
857 bytes
robertom’s picture

George Bills’s picture

I'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).

George Bills’s picture

Status: Needs review » Reviewed & tested by the community

  • boshtian committed ea6051a on 8.x-4.x authored by robertom
    Issue #2976587 by robertom, George Bills: Cache collision, block...
boshtian’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.