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

Prevent validation of auto-drafts, including when merely accessing New Post screen #1301

merged 1 commit into from Aug 1, 2018


None yet
2 participants
Copy link

commented Aug 1, 2018

When testing #1297 I found that the frontend post validation logic is being invoked for auto-draft posts. When accessing the New Post screen an auto-draft is created immediately, and this is resulting in that validation loopback request to the frontend to check the validity of a post that has nothing in it yet. Validation needs to be prevented for such posts; it should only be done once a post is saved as a draft.

@westonruter westonruter added this to the v1.0 milestone Aug 1, 2018

@westonruter westonruter requested a review from kienstra Aug 1, 2018

@kienstra kienstra self-assigned this Aug 1, 2018

Copy link

left a comment


Hi @westonruter,
This looks good.

I also saw that $should_validate_post was true when creating a new post.

But with this PR, it is false, and it doesn't add validate_queued_posts_on_frontend() as a callback of shutdown.

@westonruter westonruter merged commit 6607160 into develop Aug 1, 2018

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/prevent-validating-auto-drafts branch Aug 1, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.