Opened 12 years ago
Closed 11 years ago
#23887 closed defect (bug) (fixed)
Some Post Formats seen as "empty" but shouldn't
Reported by: | WraithKenny | Owned by: | markjaquith |
---|---|---|---|
Milestone: | 3.6 | Priority: | high |
Severity: | critical | Version: | 3.6 |
Component: | Post Formats | Keywords: | has-patch commit |
Focuses: | Cc: |
Description
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)
Change History (17)
#5
@
12 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
@
12 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
@
12 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.
#14
@
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.
error logs show:
Not. Helpful. :-/
Anyway, patch lets you save some post formats ('audio', 'video', 'quote', 'image', 'link') without title, content or excerpt.