Make WordPress Core

Opened 7 years ago

Closed 7 years ago

#40417 closed defect (bug) (fixed)

News feeds are cached by site locale instead of user locale

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


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 7 years ago.

Download all attachments as: .zip

Change History (6)

7 years ago

#1 @iandunn
7 years ago

  • Keywords has-patch added

#2 @SergeyBiryukov
7 years ago

  • Milestone changed from Awaiting Review to 4.8

Related: #32804

#3 @lukecavanagh
7 years ago

40417.diff Applies cleanly and seems to work well.

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

7 years ago

#5 @ocean90
7 years ago

  • Owner set to ocean90
  • Resolution set to fixed
  • Status changed from new to closed

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.