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
merged 1 commit into from
Aug 1, 2018

Conversation

westonruter
Copy link
Member

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
@kienstra kienstra self-assigned this Aug 1, 2018
Copy link
Contributor

@kienstra kienstra left a comment

Choose a reason for hiding this comment

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

Approved

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
@westonruter westonruter deleted the fix/prevent-validating-auto-drafts branch August 1, 2018 18:27
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.

2 participants