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.
The cache decorator definition needs to contain a cache tag, then it should work combined with the change in the issue above. Should be a one line change.
This will require test coverage:
- Enable two languages (see earlier patch in the other issue)
- Create an aggregator feed using one language and check the blocks
- Switch language and check blocks again.
Comment | File | Size | Author |
---|---|---|---|
#12 | drupal8.block-language-cache-test.12.patch | 1.34 KB | sun |
#8 | aggregator-1893818-8.patch | 713 bytes | tim.plunkett |
#4 | block-language-cache-tag-1893818-4.patch | 3.77 KB | Berdir |
#4 | block-language-cache-tag-1893818-4-interdiff.txt | 1.2 KB | Berdir |
#3 | block-language-cache-tag-1893818-3.patch | 3.93 KB | Berdir |
Comments
Comment #1
xjmComment #2
BerdirOk, here we go. Test coverage and the fix, which is trivial now that the cache decorator is fixed.
Comment #3
BerdirDocumentation fixes for the test. the wording there can probably be improved a bit :)
Comment #4
BerdirAnd removed that commented out code, that wasn't actually necessary.
Comment #5
BerdirHas tests :)
Comment #6
aspilicious CreditAttribution: aspilicious commentedThnx!
Comment #7
webchickWow! Great work on the test lines of code: fix line of code ratio! :D
Committed and pushed to 8.x. Thanks!
Comment #8
tim.plunkettThis wasn't rerolled/retested after #293318: Convert Aggregator feeds into entities :(
Comment #9
webchickbzzzt.
Committed and pushed to 8.x. Thanks!
Comment #10
sunWhy did we add this test to Aggregator module?
The code, logic, and fix belongs to Block module's plugin manager, so essential test coverage for Block module's own functionality lives in Aggregator module now.
Comment #11
BerdirWell, we can move it. Aggregator was one of the obvious real use cases, so that's what I picked it for writing the test.
If #1888702: Use configuration selection instead of derivatives for some blocks happens, then we kinda need to move it, although I'm not sure if any real derivate examples will remain, is there a test derivate block plugin implementation that we could use?
Comment #12
sunComment #13
BerdirYes, let's do this :)
Comment #14
catchOpened #1907434: Add a helper for clearing of multiple (but finite) variations of cache IDs - cache tags might not be the best choice for stuff that only varies by language.
Comment #15
catchCommitted/pushed to 8.x, thanks!