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 1 commit into from Sep 13, 2018


Copy link

@westonruter westonruter commented Sep 12, 2018

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


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.

… validation
Copy link

@amedina amedina left a comment

Ship it!

@westonruter westonruter merged commit f7b8112 into develop Sep 13, 2018
2 checks passed
2 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
continuous-integration/travis-ci/push The Travis CI build passed
@westonruter westonruter deleted the fix/classic-editor-post-save-validation branch Sep 13, 2018
Copy link

@ricardobrg ricardobrg commented Sep 13, 2018

@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
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.