Make WordPress Core

Opened 13 years ago

Closed 13 years ago

#18870 closed defect (bug) (duplicate)

Draft posts without title and content disappear from posts table

Reported by: metai's profile metai Owned by:
Milestone: Priority: normal
Severity: major Version: 3.3
Component: UI Keywords: needs-patch
Focuses: Cc:


Reproduced this bug both on a clean WP 3.2.1 install and today's (2011-10-06) nightly ("WordPress 3.3-aortic-dissection"), completely empty theme, no plugins installed or activated.

Bug reproduction:

  • empty theme (this is a backend bug)
  • functions.php only contains the definition of a custom post type copied verbatim from the example at
  • create new "product"
  • neither fill in the title nor the content
  • click "Publish"

WP will annouce "Post published". The status will remain "draft". The post will not show up in the "products" table, and not in the drafts filter. It is, by common user means, not reachable anymore.

When going back to the edit screen and moving the post to trash, it will show up in the "trash" filter, titled "Auto-Draft". Also, if content is filled into the editor, it will show up in the table with "(no title)".

(I'm setting this to "major" severity because I've had several customers create inaccessible entries this way. I only found out because they uploaded images to these entries, and the elusive post was linked under "attached to" from the media table. Also, I think it's a UI error, so I'm assigning it to the "UI" component.)

Change History (7)

#1 @dd32
13 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

See #17115

Custom Post Types need to be setup to require either a title or content (or fill it in somehow) as well as the above bug.

#2 @metai
13 years ago

  • Resolution duplicate deleted
  • Status changed from closed to reopened
  • Summary changed from Empty posts of custom post type do not appear in posts table to Draft posts without title and content disappear from posts table

Sorry for reopening this. It is more severe than I realized, and I don't think it's a duplicate of #17115.

This does not only happen for custom post types. It actually applies to regular posts and pages, too. Without editor content, posts without title disappear from the posts table.

If there's editor content, they will show up in the table titled "(no title)". It would be sufficient to apply this non-title to posts without post_content, too. Not showing these posts in the posts table, however, IMHO is a separate, serious bug.

#3 @dd32
13 years ago

yes, it's a duplicate of before mentioned ticket, as well as a few others which have been closed as duplicates of it.

It's a UI bug (that the success message is shown), Posts must have a Title or Content, If it has neither, it shouldn't give the success message. Custom post types need to operate with the same restriction.

The Auto Drafts are a separate system, which doesn't follow the exact way I think you're thinking it does..

See also: #18288 and also #11082

#4 @metai
13 years ago

This is not about the success message, very obviously it is wrong in saying "published". But the other bug reports are making the wrong assumption that "nothing is happening".

The post actually gets inserted into the database with draft status, you can confirm that by checking the SQL database. The post just does not show up in the posts overview table.

And if it's not in the posts table, it is quite unreachable afterwards through regular UI means. Only if you go back with the browser back button, remember its ID, or if it's linked in the media library through an attachment you can edit it.

Last edited 13 years ago by metai (previous) (diff)

#5 @nacin
13 years ago

  • Milestone set to Awaiting Review

#6 @nacin
13 years ago

Is it an auto-draft in the table? Cause that's different.

#7 @nacin
13 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from reopened to closed

Duplicate of all tickets linked to herein.

Note: See TracTickets for help on using tickets.