[wp-trac] [WordPress Trac] #44349: Posts show up multiple times in backend, when imported with Import WordPress tool

WordPress Trac noreply at wordpress.org
Tue Feb 4 14:25:17 UTC 2020


#44349: Posts show up multiple times in backend, when imported with Import
WordPress tool
-------------------------------------------+------------------------------
 Reporter:  wzshop                         |       Owner:  (none)
     Type:  defect (bug)                   |      Status:  new
 Priority:  normal                         |   Milestone:  Awaiting Review
Component:  Query                          |     Version:  4.9.6
 Severity:  normal                         |  Resolution:
 Keywords:  reporter-feedback 2nd-opinion  |     Focuses:
-------------------------------------------+------------------------------

Comment (by terraGirl):

 Another vote for adding a second default "order by" for example the post
 ID.

 My problem: we migrated data from an old osCommerce store over into WP.
 During the migration the timestamp for all media files defaulted to
 "1970-01-01 00:00:00". This meant we had over a thousand attachments with
 the same timestamp.

 Result: In the media library, it was impossible to scroll through the
 images as the pages kept showing the same content.

 Our solution: we looped through the posts & added 1 second to the
 post_date and post_date_gmt to make it unique. The media library can now
 be navigated with prev / next without any issues.

 Preferred solution: The assumption that post_date is unique is flawed as
 data may have been imported externally. To avoid issues with paginated
 scrolling the default "order by" should be supplemented by "id" which is
 always unique.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/44349#comment:13>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list