-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Move the templates prePersist logic to core-data #27464
Conversation
Size Change: -67 B (0%) Total Size: 1.19 MB
ℹ️ View Unchanged
|
e269871
to
db31e90
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This refactoring looks great, thanks for cleaning this up!
For the most part everything seems to work as expected. However, it seems when a template part moves from auto-draft to publish the title is cleared:
Where previously when they were in auto-draft status they had titles "Footer" and "Header".
@Addison-Stavlo Good catch, it should be fixed with a different logic than what we had on master (it actually sets a title if none is provided so you end up with capitalized slug) but it's just as good I think. |
Follow-up to #26355
When saving templates whether it's from the site editor, the post editor or any editor, there's some logic that needs to run (fix titles and set the "publish" status).
Before this PR, this logic was applied in an ad-hoc way. This PR refactors it and implements a
prePersist
handler for entities and also consolidate this with some pre persist behavior we had for regular post types.