Skip to content

[docs] Rename duplicate manifest slugs breaking developer.wordpress.org pages - #4266

Draft
mho22 wants to merge 2 commits into
trunkfrom
rename-duplicate-handbook-slugs
Draft

[docs] Rename duplicate manifest slugs breaking developer.wordpress.org pages#4266
mho22 wants to merge 2 commits into
trunkfrom
rename-duplicate-handbook-slugs

Conversation

@mho22

@mho22 mho22 commented Aug 19, 2026

Copy link
Copy Markdown
Collaborator

Motivation for the change, related issues

Fixes #4264.

The developer.wordpress.org handbook importer matches pages by bare slug, not by path (the slug_only map in wporg-markdown/inc/class-importer.php). manifest.json had two entries with the slug getting-started: the Blueprints index and the Xdebug quick start. When the Xdebug docs were imported, the importer matched the existing Blueprints post by slug and converted it into the Xdebug page, so /playground/blueprints/getting-started/ now 404-redirects to /playground/developers/xdebug/getting-started/.

The slug resources has the same collision: /playground/resources/ (Links and Resources) currently redirects to /playground/blueprints/steps/resources/ (the Blueprint steps reference), and the two "Links and resources" links on the handbook landing page land on the wrong page.

Implementation details

One commit per renamed page. In each pair the older, more heavily linked URL keeps its slug.

  • /developers/xdebug/getting-started/developers/xdebug/xdebug-getting-started: frontmatter, manifest.json, two links in the Xdebug introduction, a client-side redirect in redirections.js, and the es/fr/pt-BR i18n copies.
  • /resources/links-and-resources: frontmatter, manifest.json, links in intro.md, the Blueprints tutorial and translations.md, a flipped redirect in redirections.js (the page originally lived at /links-and-resources), and all i18n copies. Translated frontmatter overrides the original slug, so the i18n updates are required for the locale builds to pass.

No manual action is needed on developer.wordpress.org: on the next import run the Blueprints manifest entry re-claims the hijacked post by slug and update_post_from_manifest restores its parent and title; the two renamed pages are created as new posts.

Breaking change: two documentation URLs move — /developers/xdebug/getting-started and /resources. Old links to them redirect on the Docusaurus site; on developer.wordpress.org old links to the Xdebug quick start will land on the restored Blueprints page until updated.

Testing Instructions (or ideally a Blueprint)

  1. npx nx build docs-site — builds all locales; dist/docs/build contains real pages at the new paths and redirect pages at the old ones, and /blueprints/getting-started/ still exists.
  2. npx nx check-orphan-pages docs-site — passes.
  3. Today's breakage: curl -sI https://developer.wordpress.org/playground/blueprints/getting-started/ returns a 301 to the Xdebug page.

mho22 added 2 commits August 19, 2026 19:12
The developer.wordpress.org handbook importer matches pages by bare slug. The Xdebug page and the Blueprints getting-started page both used the slug getting-started, so the import converted the Blueprints page into the Xdebug page and broke /playground/blueprints/getting-started/. Rename the Xdebug slug and redirect the old path.

Fixes #4264.
Same slug collision as the Xdebug getting-started page: the handbook page and the Blueprint steps reference both used the slug resources, so /playground/resources/ redirects to /playground/blueprints/steps/resources/ on developer.wordpress.org. Rename the handbook page slug back to links-and-resources and redirect the old path.
@github-actions github-actions Bot added the [Type] Documentation Improvements or additions to documentation label Aug 19, 2026
@mho22 mho22 changed the title [docs] Rename duplicate manifest slugs that break developer.wordpress.org pages [docs] Rename duplicate manifest slugs breaking developer.wordpress.org pages Aug 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Type] Documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Docs: Blueprints link redirects to xdebug

1 participant