WordPress.org

Make WordPress Core

Opened 9 years ago

Closed 9 years ago

Last modified 7 years ago

#1257 closed defect (bug) (fixed)

Pingbacks sent from wrong URI for posts first published in advanced editing mode

Reported by: mdawaffe Owned by: markjaquith
Milestone: Priority: normal
Severity: major Version: 1.5.1.1
Component: General Keywords: bg|has-patch bg|commit
Focuses: Cc:

Description

Publishing a post from advanced editing mode will, if it is the first time the post has been published, send pingbacks from non-permalinked URIs:
http://example.com/?p=204 rather than http://example.com/a-post/

Attachments (1)

fix-permalink-in-outgoing-pings.diff (1.3 KB) - added by markjaquith 9 years ago.
Patch for /branches/1.5/

Download all attachments as: .zip

Change History (11)

comment:1 mdawaffe9 years ago

  • Patch set to No

comment:2 ryan9 years ago

In 1.5.1, draft posts are not given a permalink GUID since the post slug is not set on a draft post. Instead, a query string GUID is used. Once pubilshed, the GUID should be updated so that a proper permalink-style GUID is used. The GUID life cycle should be similar to the post slug lifecycle. Leave the GUID blank for draft posts. Set the GUID once published.

comment:3 markjaquith9 years ago

  • Version changed from 1.5.1 to 1.5.1.1

This issue persists in 1.5.1.1

comment:4 ryan9 years ago

  • Milestone set to 1.6
  • Owner changed from anonymous to ryan

comment:5 markjaquith9 years ago

  • Keywords bg|needs-patch added
  • Severity changed from minor to major

comment:6 bennettmcelwee9 years ago

The cause of this problem is the cache mechanism used in get_post(). I created the FixBack WordPress plugin to fix this problem, but of course a core change would be more elegant. See WordPress pingback and trackback bug for full details.

markjaquith9 years ago

Patch for /branches/1.5/

comment:7 markjaquith9 years ago

  • Keywords bg|has-patch bg|commit added; bg|needs-patch removed
  • Owner changed from ryan to markjaquith
  • Status changed from new to assigned

I've been sitting on this patch (was posted to wp-hackers). Really sorry that I didn't get it uploaded in time for 1.5.2! Anyway, let's be sure to get it into the next 1.5 branch release.

comment:8 ryan9 years ago

Can we move this code into functions? Perhaps clean_post_cache() and clean_page_cache() which take a post/page ID as an argument. Call these whenever we update a post/page.

comment:9 ryan9 years ago

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

(In [2873]) Add clean_post_cache() and clean_page_cache(). Reset GUID when transitioning from draft to publish. fixes #1257

comment:10 anonymous7 years ago

  • Milestone 2.0 deleted

Milestone 2.0 deleted

Note: See TracTickets for help on using tickets.