Make WordPress Core

Opened 11 years ago

Closed 11 years ago

#23887 closed defect (bug) (fixed)

Some Post Formats seen as "empty" but shouldn't

Reported by: wraithkenny's profile WraithKenny Owned by: markjaquith's profile markjaquith
Milestone: 3.6 Priority: high
Severity: critical Version: 3.6
Component: Post Formats Keywords: has-patch commit
Focuses: Cc:


In wp_insert_post, there's a $maybe_empty check to see if title, content, or excerpt is not empty, and won't save if all are empty. Some Post formats don't require any of these fields.

Attachments (2)

23887.patch (816 bytes) - added by WraithKenny 11 years ago.
23887.2.patch (784 bytes) - added by SergeyBiryukov 11 years ago.

Download all attachments as: .zip

Change History (17)

11 years ago

#1 @WraithKenny
11 years ago

  • Keywords has-patch added

error logs show:

[29-Mar-2013 04:47:00 UTC] 1

Not. Helpful. :-/
Anyway, patch lets you save some post formats ('audio', 'video', 'quote', 'image', 'link') without title, content or excerpt.

#2 @SergeyBiryukov
11 years ago

#23892 was marked as a duplicate.

#3 @SergeyBiryukov
11 years ago

  • Priority changed from normal to high
  • Severity changed from normal to critical

Related: #17115, #23623

#4 @SergeyBiryukov
11 years ago

  • Milestone changed from Awaiting Review to 3.6

#5 @WraithKenny
11 years ago

Some notes on this:

When you submit an edit, with no title, content, or excerpt, the post doesn't save (autosave does, since it has a placeholder title)... but there's supposed to be an error message. The error message doesn't show; instead you get the published, view post message. (see #17115)

Also, The patch I submitted let's you save the post formats I listed (not a vetted list tho) even without title, content, or excerpt, but the patch is incomplete as it doesn't check if the appropriate meta is empty or not. (::TODO::) See 23859 for similar logic but perhaps needs format by format checks.

#6 @DrewAPicture
11 years ago

We should probably generate some kind of non-int title regardless of whether the post actually needs one.

It's up to themes to handle whether these types of post format posts will have a single view, and if they do, we need to take #5305 into account. IIRC, @alexkingorg covered this case in his original Post Formats UI concept and plugin.

#7 @helen
11 years ago

Mentioned the title thing in my last Make/Core update:

Titles need to be filled in based on content for those formats, a la P2. Might be nice to try to do something smart with image, like detecting an alt or title attribute for the fill-in, but at the very least, something better than (no title) or Auto Draft.

#8 @davidwilliamson
11 years ago

#23957 was marked as a duplicate.

#9 @SergeyBiryukov
11 years ago

#23978 was marked as a duplicate.

#11 @SergeyBiryukov
11 years ago

#24037 was marked as a duplicate.

#12 @wonderboymusic
11 years ago

  • Keywords commit added

We need to commit this- #23623 is problematic as well

#13 @markjaquith
11 years ago

  • Resolution set to fixed
  • Status changed from new to closed

Looks like the patch was the same as for #23623

In [23986]:

Allow the content of no-title audio, video, quote, and image posts to be blanked.
props wonderboymusic. fixes #23623.

#14 @SergeyBiryukov
11 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

There's still a problem with deleting image posts without a title (see ticket:24046:15). We don't have the format context in wp-admin/post.php after clicking the Delete link.

Looks like get_post_format() (from 23887.patch) would be the correct solution here. Refreshed.

#15 @markjaquith
11 years ago

  • Owner set to markjaquith
  • Resolution set to fixed
  • Status changed from reopened to closed

In 24015:

Use get_post_format() instead of assuming we already have it.

  • Fixes an issue where image posts without a title could not be deleted

fixes #23887. see #24046. props WraithKenny, SergeyBiryukov.

Note: See TracTickets for help on using tickets.