WordPress.org

Make WordPress Core

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#5589 closed defect (bug) (fixed)

Import GUID functionality no longer works

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

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 6 years ago.
Patch against trunk

Download all attachments as: .zip

Change History (8)

comment:1 peterjanes6 years ago

  • Cc peterjanes added

comment:2 lloydbudd6 years ago

  • Keywords has-patch added

comment:3 westi6 years ago

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

comment:4 westi6 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.

peterjanes6 years ago

Patch against trunk

comment:5 peterjanes6 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 westi6 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 jeremyclarke6 years ago

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

Note: See TracTickets for help on using tickets.