WordPress.org

Make WordPress Core

Opened 4 months ago

Closed 2 months ago

#40417 closed defect (bug) (fixed)

News feeds are cached by site locale instead of user locale

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

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 4 months ago.

Download all attachments as: .zip

Change History (6)

@iandunn
4 months ago

#1 @iandunn
4 months ago

  • Keywords has-patch added

#2 @SergeyBiryukov
4 months ago

  • Milestone changed from Awaiting Review to 4.8

Related: #32804

#3 @lukecavanagh
3 months ago

40417.diff Applies cleanly and seems to work well.

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


2 months ago

#5 @ocean90
2 months 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.