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

Ensure only the post being edited in the classic editor is queued for validation #1424

Merged
merged 1 commit into from
Sep 13, 2018

Conversation

westonruter
Copy link
Member

When a post is saved via the classic editor it needs to be re-validated on the frontend to show the validation warning:

image

However, at present the save_post action is being used in a way that other post edits are also causing re-validation to happen for them as well. This is particularly problematic when doing a mass import of posts.

So what is needed is to restrict the save_post action to only follow-through when we are explicitly saving changes for a specific post in the classic editor.

Note that this is all much cleaner for Gutenberg because we can rely on the REST API field to manage the re-validation.

Fixes #1404.

Copy link
Member

@amedina amedina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ship it!

@westonruter westonruter merged commit f7b8112 into develop Sep 13, 2018
@westonruter westonruter deleted the fix/classic-editor-post-save-validation branch September 13, 2018 00:48
@ricardobrg
Copy link
Contributor

@westonruter it worked perfectly with WooCommerce CSV import and WordPress xml import.

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.

3 participants