Closed Bug 435817 Opened 17 years ago Closed 17 years ago

Page cached with wrong l10n

Categories

(support.mozilla.org :: Knowledge Base Software, task)

task
Not set
major

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: zzxc, Assigned: lorchard)

References

()

Details

(Whiteboard: tiki_triage)

Attachments

(1 file, 1 obsolete file)

The Live Chat page (see the url) is currently cached with zh-TW links and user interface. (If people browse the site using links here, they end up on zh-TW pages)
OS: Linux → All
Hardware: PC → All
Severity: normal → critical
OS: All → Linux
Hardware: All → PC
Severity: critical → normal
Additionally, http://support.mozilla.com/en-US/kb/Managing%20profiles is in zh-TW http://support.mozilla.com/en-US/kb/When+will+Firefox+3+be+released is in ca http://support.mozilla.com/en-US/kb/Running+Firefox+on+mobile+devices is in ca I can't for the life of me reproduce this in support-stage.mozilla.org. lorchard, could this be memcache related?
Severity: normal → major
OS: Linux → All
Hardware: PC → All
Not sure why, but I must've commented out the locale part of the cache key generation. Though I can't personally reproduce this bug, this change is the only thing I can think of that might be causing it.
Assignee: nobody → lorchard
Status: NEW → ASSIGNED
Attachment #322598 - Flags: review?(nelson)
Attachment #322598 - Flags: review?(laura)
Comment on attachment 322598 [details] [diff] [review] Uncommenting locale as part of page output cache keys looks like worth a try. What do you think Laura?
Attachment #322598 - Flags: review?(nelson) → review+
Attachment #322598 - Flags: review?(laura) → review+
I wish we could repro, but this patch WFM.
I've gone ahead and checked this in and tagged it: https://svn.mozilla.org/projects/sumo/tags/1.0/20080526_r13867/
FWIW, you need to be logged out to reproduce it.
lorchard, did you request a push for this?
Keywords: push-needed
I hadn't requested a push, but I have now.
For what it's worth, I was eventually able to reproduce this bug on my dev machine with the following two pages: http://support.mozilla.com/en-US/kb/Installing+Firefox+on+Mac http://support.mozilla.com/zh-TW/kb/Installing+Firefox+on+Mac Visiting the zh-TW locale repeatedly eventually gave the en-US locale incorrectly cached links surrounding the content.
As it turns out, my previous patch appears only to have fixed half of the problem. I assumed the locale was directly tied to the page content, when in reality the same page content can be displayed in multiple locale contexts. Thus, if someone viewed an English page in a non-English context, the English context would display the nav links and etc for the non-English context as well. So, the previous patch partially fixed that. But, it also partially broke approval and rollback, in that the changes would appear only for the locale used by the user performing the action. This reworked patch caches page output by locale, but invalidates all locale-wise caches for a page when approval or rollback occurs. This is done by maintaining a timestamp for caches by locale and page name, as well as a timestamp for the page name alone when approval/rollback occurs. When the page is visited, the output cache timestamp is compared with the page name timestamp. If the page name time is newer than the output time, the output cache is discarded. Thus, caches for all combination of locale and page name will be invalidated after approval/rollback.
Attachment #322598 - Attachment is obsolete: true
Attachment #322697 - Flags: review?(nelson)
Attachment #322697 - Flags: review?(laura)
Hopefully with the latest push, this should be fixed. https://svn.mozilla.org/projects/sumo/tags/1.0/20080530_r14170/
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Attachment #322697 - Flags: review?(laura)
Whiteboard: tiki_triage
Attachment #322697 - Flags: review?(nelson)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: