#15041 closed defect (bug) (fixed)
Page auto-draft & guid generation
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | 3.1 | Priority: | highest omg bbq |
Severity: | critical | Version: | 3.0.1 |
Component: | Permalinks | Keywords: | has-patch needs-testing |
Focuses: | Cc: |
Description
Guid generation for pages is currently broken. auto-draft
status is currently not handled and all page guids are simply the base site_url
instead of site_url + ?page_id=000
.
I looks as if auto-drafts
were handled for posts here: http://core.trac.wordpress.org/changeset/14948
Attached is a patch for the _get_page_link()
function in wp-includes/link-template.php
to account for a post_status
of auto-draft
and properly generate the guid for pages (patch is to 3.0.1 tag, but issue exists in the same function in 3.0 branch and trunk as well).
Attachments (2)
Change History (15)
#4
@
14 years ago
The change that patch wants to make to line 283 needs modification. I took that from the post permalink function and forgot to change $post_link
to $link
.
#6
@
14 years ago
- Milestone changed from 3.1 to Future Release
Punting all tickets that are not regressions in 3.1.
#7
@
14 years ago
- Milestone changed from Future Release to 3.1
Per IRC. This is a nasty bug for anyone using feeds in any regard for pages. Rare, but I'm sure someone does, perhaps for child pages or something.
Might we need to run an upgrade script to update old page GUIDs, too?
#8
@
14 years ago
- Priority changed from normal to highest omg bbq
- Severity changed from major to critical
#10
@
14 years ago
- Resolution fixed deleted
- Status changed from closed to reopened
For [17061]: The check for
isset($post->post_status)
in line 192 comes after $post->post_status has already been used to create $draft_or_pending in line 188, which is to late to avaid notices.
Thus, the check should be part of the $draft_or_pending conditional in line 188.
REVISED auto draft fix for pages