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.
Only sending the cache data causes an issue during rendering.
Comment | File | Size | Author |
---|---|---|---|
#10 | broken-op-block.png | 14.96 KB | kristiaanvandeneynde |
#2 | group-cache-data.patch | 2.63 KB | benjy |
|
Comments
Comment #2
benjy CreditAttribution: benjy at PreviousNext commentedComment #3
kristiaanvandeneyndeYour patch seems to do more than advertised. Wouldn't it suffice to hoist these two lines to the top of the function?
Edit: Also thanks for the patch! I had no idea Drupal trips over an empty build with cacheable metadata. :)
Comment #4
benjy CreditAttribution: benjy at PreviousNext commentedI just moved to using the CacheableMetadata API instead of manually constructing the array.
This applyTo() call will ensure all the correct cache keys are set on the cache array.
Comment #5
benjy CreditAttribution: benjy at PreviousNext commentedAny chance of getting this patch committed?
Comment #6
kristiaanvandeneyndeYes
Comment #8
kristiaanvandeneyndeCleaned it up a bit and committed with you as the author. Thanks for the patch!
P.S.: Forgive my brevity last week. I'm but alone as a maintainer and the issue queue is long. Sometimes I prefer to see a simple "bump" over an "are we there yet?" :)
Comment #10
kristiaanvandeneyndeReverted the patch because it now displays the block everywhere, even if there are no operations.
Before I commit any more code for this I will need either a test or a way to reproduce the error.
Comment #11
geek-merlinThis is simple: All the rest of the code is perfect. But moving that code outside the for-loop will create a block even when no link is in it.
Daring to set NR as the change is trivial.
Comment #12
kristiaanvandeneyndeThis part of the code got a huge overhaul in #2906082: Figure out a way to cache lists using group permissions so maybe we should wait until that one lands