Make WordPress Core

Opened 15 years ago

Closed 15 years ago

#13555 closed defect (bug) (fixed)

GUID and feed issues with custom post types

Reported by: nacin's profile nacin Owned by:
Milestone: 3.0 Priority: lowest
Severity: trivial Version:
Component: Posts, Post Types Keywords: has-patch
Focuses: Cc:

Description

  1. With rewrite => true, all posts of a custom post type will get the same guid. Aside from being a Bad Thing, this breaks feeds in particular (looks like Safari cares deeply).
  1. With ugly permalinks, the feed won't validate. Seems to be annoyed with the underscore, or something: <link>http://localhost/commit/?post_type=manager&p=45</link>

Attachments (1)

13555.patch (391 bytes) - added by hakre 15 years ago.
MINOR: some whitespace

Download all attachments as: .zip

Change History (13)

#1 follow-up: @beaulebens
15 years ago

In your example for 2), I imagine it's unhappy about "&" which needs to be encoded in XML.

#2 in reply to: ↑ 1 @westi
15 years ago

Replying to beaulebens:

In your example for 2), I imagine it's unhappy about "&" which needs to be encoded in XML.

That would make perfect sense.

#3 @nacin
15 years ago

Yep. We've never previously had & there, even ugly links.

Currently tracking down the first issue. Looks like get_permalink() is returning just http://localhost/commit/manager/ when generating an auto-draft.

#4 @westi
15 years ago

(In [14947]) Escape the guid urls when placing them in feeds and other xml locations. See #13555.

#5 follow-up: @wmrom
15 years ago

Why can't we omit the post type altogether? using just ?p=<post_ID> in the url gives you the right page, and the post_ID is, de facto, unique.

#6 in reply to: ↑ 5 @nacin
15 years ago

Replying to wmrom:

Why can't we omit the post type altogether? using just ?p=<post_ID> in the url gives you the right page, and the post_ID is, de facto, unique.

Hrm. It doesn't on my install, though it should. There should be a canonical redirect, the same way p=2 goes to page_id=2.

#7 @nacin
15 years ago

(In [14948]) Consider 'auto-draft' a draft in get_post_permalink(). prevents custom post types from getting borked GUIDs. see #13555

#8 @westi
15 years ago

(In [14949]) Move the escaping into get_guid() so we don't have to repeat ourselves. See #13555.

#9 @westi
15 years ago

(In [14950]) Some more url escaping in feeds. See #13555.

#10 @nacin
15 years ago

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

(In [14952]) Final bit of escaping in feeds. fixes #13555

@hakre
15 years ago

MINOR: some whitespace

#11 @hakre
15 years ago

  • Keywords has-patch added
  • Priority changed from normal to lowest
  • Resolution fixed deleted
  • Severity changed from blocker to trivial
  • Status changed from closed to reopened

MINOR: Little cleaning up behind. Reopen for that, close if you see unfit or just commit.

#12 @nacin
15 years ago

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

(In [15264]) Two birds with one stone. fixes #13902, props ocean90, wahgnube. fixes #13555, props hakre.

Note: See TracTickets for help on using tickets.