Make WordPress Core

Opened 9 years ago

Closed 9 years ago

#40417 closed defect (bug) (fixed)

News feeds are cached by site locale instead of user locale

Reported by: iandunn Owned by: ocean90
Priority: normal Milestone: 4.8
Component: I18N Version: 4.7
Severity: normal Keywords: has-patch
Cc: Focuses: administration

Description

Steps to reproduce:

  1. Delete any dash_* transients
  2. Set the site language to English
  3. Load the Dashboard. The feed will appear in English
  4. Set your user locale to French
  5. Reload the Dashboard. The feed will still appear in English, instead of French.
  6. Delete any dash_* transients
  7. Reload the Dashboard. The feed will now appear in French

Attachments (1)

40417.diff (558 bytes ) - added by iandunn 9 years ago.

Download all attachments as: .zip

Change History (6)

@iandunn
9 years ago

#1 @iandunn
9 years ago

  • Keywords has-patch added

#2 @SergeyBiryukov
9 years ago

  • Milestone Awaiting Review4.8

Related: #32804

#3 @lukecavanagh
9 years ago

40417.diff Applies cleanly and seems to work well.

This ticket was mentioned in Slack in #core by obenland. View the logs.


9 years ago

#5 @ocean90
9 years ago

  • Owner set to ocean90
  • Resolutionfixed
  • Status newclosed

In 40793:

Dashboard: Use get_user_locale() for the news feed cache key.

Since the feed URL can be localized the cache key has to be built with the same locale as the current user is using.

Props iandunn.
Fixes #40417.

Note: See TracTickets for help on using tickets.