Skip to content
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

🐛 Fixed slug not always updating for draft posts #21691

Merged
merged 5 commits into from
Nov 23, 2024

Conversation

9larsons
Copy link
Contributor

@9larsons 9larsons commented Nov 21, 2024

ref https://linear.app/ghost/issue/ONC-548/

There have been reported cases of the editor not updating the slug for draft posts. The logic should be as follows: for a draft post, if the title was updated and we do not detect a custom slug, update it.

This got out of sync due to actions where the save was triggered but the title onBlur effect (which updates the slug) was not triggered. This has been resolved by evaluating the slug in the before save actions.

ref https://linear.app/ghost/issue/ONC-548/

There have been reported cases of the editor not updating the slug for draft posts. The logic should be as follows: for a draft post, if the title was updated and we do not detect a custom slug, update it.

This got out of sync due to actions where the save was triggered but the title onBlur effect (which updates the slug) was not triggered. This has been resolved by evaluating the slug in the before save actions.
@9larsons 9larsons enabled auto-merge (squash) November 21, 2024 20:09
The cancel title save task was causing the initial save to quit altogether, preventing moving to lexical-editor.edit and creation of the model entry.
@9larsons 9larsons merged commit 7083bd0 into main Nov 23, 2024
17 checks passed
@9larsons 9larsons deleted the fix-slug-editor-update branch November 23, 2024 00:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant