If caching is enabled on a view, the views cache system uses the current interface language as part of the cache key to ensure that a view rendered in one language cannot be served from the cache to a user viewing the site in another language. This makes sense.
However, views display content (e.g. entities), so the content language of the current page should also be included in the cache key. Not doing so can cause problems in situations where the content language and interface language are not the same (e.g. a view that displays nodes rendered in French on a page that is otherwise displayed in English; in this case, the French nodes can later be pulled from the cache and displayed on a page that is supposed to be entirely in English, which is a bug).
Comment | File | Size | Author |
---|---|---|---|
#8 | views-content-language-cache-2476297-1.patch | 543 bytes | nicrodgers |
| |||
#1 | views-content-language-cache-2476297-1.patch | 543 bytes | David_Rothstein |
Comments
Comment #1
David_Rothstein CreditAttribution: David_Rothstein at Tag1 Consulting commentedHere is a patch.
Comment #2
nicrodgersChanging status to trigger testbot
Comment #3
nicrodgerschanging status to trigger test bot
Comment #4
nicrodgersI've been experiencing this issue too, and am happy to report that the patch applied cleanly for me and has fixed the issue.
Comment #5
joelpittetI'm using it as well.
Comment #6
nicrodgersConfirmed the patch still applies cleanly and works on the latest 7.x-3.x-dev.
Comment #7
colanWe've recently switched our testing from the old qa.drupal.org to DrupalCI. Because of a bug in the new system, #2623840: Views (D7) patches not being tested, older patches must be re-uploaded. On re-uploading the patch, please set the status to "Needs Review" so that the test bot will add it to its queue.
If all tests pass, change the Status back to "Reviewed & tested by the community". We'll most likely commit the patch immediately without having to go through another round of peer review.
We apologize for the trouble, and appreciate your patience.
Comment #8
nicrodgersRe-uploading David's patch from #1, as per comment #7 to trigger test bot.
Comment #9
joelpittetBack to RTBC thanks @nicrodgers
Comment #11
DamienMcKennaCommitted, thank you.