Make WordPress Core

Opened 6 weeks ago

Last modified 7 days ago

#62769 new enhancement

Saving Post without Title and Content

Reported by: tristup's profile tristup Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 6.7.1
Component: Posts, Post Types Keywords:
Focuses: administration Cc:

Description

Hi Team,

While saving the post, I found that the post is saving with the title and content and showing the success message as shown in the given screenshot.

  1. https://tinyurl.com/28oxwfk9

By clicking into the View Post, it opens the 404 page, which is not correct either.

I would suggest adding some validation to check if the title should not be blank, or else there might be a proper message. Also, if that post is added, it should show in the post lists.

Thanks
Tristup

Change History (5)

#1 @subrataemfluence
6 weeks ago

  • Component changed from General to Posts, Post Types
  • Focuses administration added
  • Keywords needs-screenshots 2nd-opinion added
  • Type changed from defect (bug) to enhancement
  • Version set to 6.7.1

Hi @tristup
I also think that there should be some validation check, at least for the title. Or, it could be like a Post may not be "published" without a title and can only be saved as a draft.

Also, it would be great if you could share a screenshot of your 404 page.

#2 @tristup
6 weeks ago

Hi @subrataemfluence ,

Yes, the publish button can be activated once the title is there.

Thanks

#3 @abcd95
6 weeks ago

  • Keywords needs-screenshots 2nd-opinion removed

Hey @tristup, Welcome to Trac!

I've looked into this and can confirm that this behavior only occurs in the Classic Editor. The core Gutenberg editor actually prevents this scenario by design - it doesn't allow posts to be published without a title and content.

Screenshot of the classic editor -

https://i.postimg.cc/T29VmwTJ/1.jpg

Screenshot of the Gutenberg editor -

https://i.postimg.cc/QC2hVDY9/2.jpg

If you'd like to track or contribute to fixing this issue in the Classic Editor, you can raise it in the plugin's GitHub repository here:
https://github.com/WordPress/classic-editor

Last edited 8 days ago by abcd95 (previous) (diff)

#4 @niravsherasiya7707
8 days ago

Hello @abcd95,
I looked into this on my end and found that the Gutenberg editor allows publishing a post/page without a title. Could you confirm if this is the expected behavior?

https://vimeo.com/1053634062/18e8ba7800

#5 @abcd95
7 days ago

Replying to niravsherasiya7707:

Gutenberg editor allows publishing a post/page without a title. Could you confirm if this is the expected behavior?

Thanks, @niravsherasiya7707, for pointing this out. I meant that the Gutenberg editor doesn't allow publishing a post or page without a title and content. If either of these is present, it can be published. I have updated my comment.

Note: See TracTickets for help on using tickets.