Skip to content

[Bug]: Updating Yoast SEO makes the translated "page" slug in Polylang Pro to disappear form rewrite_rules #23243

@alexanderwiden95

Description

@alexanderwiden95

Prerequisites

  • I've read and understood the contribution guidelines.
  • I've searched for any related issues and avoided creating a duplicate issue.

Please give us a description of what happened

When updating Yoast via auto-update or wp-cli the pagination can stop working giving a 404 error instead of the page.
In this example I'm using English, Swedish and Danish as my languages. I visited a Danish page which broke the Swedish "sida/2".

Step-by-step reproduction instructions

  1. Setup a clean environment with Yoast SEO (not the latest version since we need to update the plugin), Polylang Pro and a default theme such as "Twenty Twenty-Five"
  2. Add at least three languages in Polylang.
  3. Translate the page slug (slug_paged) under Languages > Translations into your different languages.
  4. Update Yoast SEO using wp-cli.
  5. Visit language A that isn't your default language in Polylang in the frontend (front page is sufficient).
  6. Navigate to a post archive in language B and notice that page 2 gives a 404 error (or simply observe the rewrite_rules option in the database)

Expected results

  1. The flushing of the permalinks should not interfere with Polylangs page translations.

Actual results

  1. All pages using a translated "page" slug now is showing 404 until permalinks are flushed again.

Screenshots, screen recording, code snippet

Here is a diff of the rewrites before and after the visit on the in my case a danish page.
rewrites.txt

PHP version

8.4

WordPress version

6.9.4

WordPress Theme

Twenty Twenty-Five (but not specific)

Yoast SEO version

27.5

Relevant plugins in case of a bug

Polylang Pro

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions