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 post saving until title, content, or excerpt non-empty #1201

Closed
aduth opened this issue Jun 15, 2017 · 1 comment
Closed

Prevent post saving until title, content, or excerpt non-empty #1201

aduth opened this issue Jun 15, 2017 · 1 comment
Assignees
Labels
General Interface Parts of the UI which don't fall neatly under other labels. [Type] Bug An existing feature does not function as intended

Comments

@aduth
Copy link
Member

aduth commented Jun 15, 2017

Steps to reproduce:

  1. Navigate to Gutenberg > New Post

Expected result:

I should not have the option to save the post.

Actual result:

I have the option to save the post. When I try to save the post, the request fails:

{"code":"empty_content","message":"Content, title, and excerpt are empty.","data":{"status":400}}

We should validate that one of title, content, or excerpt is not empty before allowing the post to be saved.

See also: https://github.com/Automattic/wp-calypso/blob/master/client/state/selectors/edited-post-has-content.js

@aduth aduth added General Interface Parts of the UI which don't fall neatly under other labels. [Type] Bug An existing feature does not function as intended labels Jun 15, 2017
@aduth aduth self-assigned this Jun 15, 2017
@theMikeD
Copy link

I don't suppose there is a way for me to hook into this somehow to prevent the save button from being active until arbitrary event x has occurred? For example I'd like to force the user to write a manual excerpt.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
General Interface Parts of the UI which don't fall neatly under other labels. [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

2 participants