WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#5589 closed defect (bug) (fixed)

Import GUID functionality no longer works

Reported by: peterjanes Owned by: westi
Priority: normal Milestone: 2.5
Component: General Version: 2.3.2
Severity: normal Keywords: reporter-feedback
Cc: peterjanes

Description

WordPress used to preserve GUIDs when importing from RSS feeds. (See Changeset 2193.) Now that the importer uses wp_insert_post that no longer works, since that method always overwrites the GUID with the permalink.

I haven't seen anything that suggests this was a deliberate change, and the RSS and WordPress importers still appear to determine posts' GUIDs so they can be preserved, so I have attached a patch against WP 2.3.2 that changes wp_insert_post to accept and use a guid if provided.

Attachments (1)

wp-import-guid.txt (3.3 KB) - added by peterjanes 5 years ago.
Patch against trunk

Download all attachments as: .zip

Change History (8)

comment:1 peterjanes5 years ago

  • Cc peterjanes added

comment:2 lloydbudd5 years ago

  • Keywords has-patch added

comment:3 westi5 years ago

  • Owner changed from anonymous to westi
  • Status changed from new to assigned

comment:4 westi5 years ago

  • Keywords reporter-feedback added; has-patch removed

Thank you for your patch.

However it does not apply correctly to WordPress trunk.

Could you recreate your patch against a clean checkout of trunk and then I will ensure it gets committed.

peterjanes5 years ago

Patch against trunk

comment:5 peterjanes5 years ago

Here's the new patch from current SVN. It also picks up a change to the RSS importer where <guid> without any attributes isn't recognized.

comment:6 westi5 years ago

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

(In [6593]) Ensure that we preserve GUIDs when importing from RSS. Fixes #5589 props peterjanes.

comment:7 jeremyclarke5 years ago

Thanks so much peterjanes and westi! This will be very useful for aggregators!

Note: See TracTickets for help on using tickets.