Skip to content

Fix alias of draft page shows edit form #13210

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

zerolab
Copy link
Contributor

@zerolab zerolab commented Jul 4, 2025

See https://www.loom.com/share/9dee4dbdc2794dc9a9676df16c0f5d20

If you create an alias from a draft page and then go to edit it, you see the edit form (which the edit form for the source page) instead of the "This is an alias" message.
This is because page.get_latest_revision_as_object() will return the latest revision as an object. On pages, this is saved on latest_revision. As aliases cannot have revisions, I've updated CreatePageAliasAction to exclude latest_revision

Note that this broke somewhere between Wagtail 3.x and 4.x and it was not noticed.

Fixes #13090 and partially #13100

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Creating page drafts in secondary locales when sync is enabled exhibits buggy behaviour
2 participants