Make WordPress Core

Opened 5 years ago

Closed 8 weeks ago

#50843 closed defect (bug) (worksforme)

Default category for custom posts when post_content is empty

Reported by: tmatsuur's profile tmatsuur Owned by:
Milestone: Priority: normal
Severity: normal Version: 5.5
Component: Posts, Post Types Keywords:
Focuses: Cc:

Description

If you enter only the post_content and save, or enter the post_title and post_content and save, the default category is selected and it works as intended.

But when I type in only the post_title and save it, no categories appear to be selected.

Upon investigating the reason, if no post_content is entered, the post_status value will be "auto_draft" and as a result the default category will not be applied.

Is the above as expected?

WordPress: 5.5-RC1-48708

Change History (4)

#1 @tmatsuur
5 years ago

But when I type in only the post_title and save it, no categories appear to be selected.

This wasn't accurate.

There was a problem when the [Publish] button was clicked without entering the title and moving the "focus" to other places even once.

#2 @desrosj
5 years ago

  • Version changed from trunk to 5.5

This ticket was mentioned in Slack in #core by sirlouen. View the logs.


8 weeks ago

#4 @SirLouen
8 weeks ago

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

Reproduction Report

Description

❌ This report can't validate that the issue can be reproduced.

Environment

  • WordPress: 6.9-alpha-60093-src
  • PHP: 8.2.29
  • Server: nginx/1.29.1
  • Database: mysqli (Server: 8.4.6 / Client: mysqlnd 8.2.29)
  • Browser: Chrome 140.0.0.0
  • OS: Windows 10/11
  • Theme: Minimal Theme 1.0.0
  • MU Plugins: None activated
  • Plugins:
    • Test Reports 1.2.0

Testing Instructions

  1. Create a category called Default
  2. Select the Default Category in Writing
  3. Create a post only with Content
  4. 👌 The Default category is selected
  5. Create a post only with Title
  6. 👌 The Default category is selected

Actual Results

  1. ❌ Error condition is not occurring

Additional Notes

  • It seems that this ticket is not reproducible anymore, so I'm closing this with worksforme
Note: See TracTickets for help on using tickets.