Repository navigation
Conversation
…ueried On singular requests without a queried post, such as a post's comment feed, get_displayed_locale() read post_content off null and logged a warning from the wporg_canonical_url filter. Look up the requested locale first so most requests return early, and only read the content of a queried WP_Post. See #4683. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. Props Bot commandsYou can trigger Props Bot actions by commenting on this PR:
|
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
See https://meta.trac.wordpress.org/ticket/4683
Follow-up to #1257. On singular requests that have no queried post, such as a post’s comment feed (
/polyglots/2026/11/06/<slug>/feed/),get_displayed_locale()readpost_contentoffnull. That logged “Attempt to read property "post_content" on null” from thewporg_canonical_urlfilter.This looks up the requested locale first, so requests without a valid
?locale=return before touching the post. It then reads the content only when the queried object is aWP_Post.Testing
https://make.wordpress.org/polyglots/2026/11/06/pte-request-for-depicter-chinese-singapore/feed/, and check that no warning is logged.https://make.wordpress.org/polyglots/teams/?locale=id_IDand check that the title still names Indonesian and the canonical still carries?locale=id_id.https://make.wordpress.org/polyglots/teams/and check that the title and canonical are the overview page’s.🤖 Generated with Claude Code
Summary by CodeRabbit