Make WordPress Core

Opened 5 years ago

Closed 5 years ago

#14058 closed defect (bug) (duplicate)

Export issues on multisite configurations

Reported by: yoavf Owned by: duck_
Milestone: Priority: normal
Severity: normal Version: 3.0
Component: Export Keywords:
Focuses: Cc:

Description (last modified by yoavf)

In 3.0, some changes were introduced to the export functions that may cause the export to fail some multi-sites configuration.

For example, [14153]

This new query won't work on installations where the posts table and the users tables aren't on the same server.

2nd issue:
from wp-admin/includes/export.php

$where .= $wpdb->prepare( "AND ID IN (SELECT object_id FROM $wpdb->term_relationships WHERE term_taxonomy_id = %d) ", $term_id );

This is flawed because it assumes the term_relationship object_id is the same as the term_id which might not always be the case (ie global tags configuration).

The attached patch fixes that by using get_objects_in_term() instead. The authors selection drop down code is reverted to pre-3.0 code.

Attachments (1)

3.0.1-export.diff (2.6 KB) - added by yoavf 5 years ago.

Download all attachments as: .zip

Change History (5)

5 years ago

#1 @yoavf
5 years ago

  • Description modified (diff)
  • Milestone changed from 3.0.1 to 3.1

#2 @nacin
5 years ago

Perhaps we can use cache_users() to prevent so many get_userdata() calls. Ordering by display_name perhaps using array functions would be a nice UX improvement too.

#3 @nacin
5 years ago

  • Milestone changed from Awaiting Triage to 3.1
  • Owner set to duck_
  • Status changed from new to assigned

First issue is no longer an issue (for now).

Assigning the other to duck_.

#4 @duck_
5 years ago

  • Keywords has-patch removed
  • Milestone 3.1 deleted
  • Resolution set to duplicate
  • Status changed from assigned to closed

We're okay on both (for now), since both are issues with filtering.

I had noticed the weirdness in selecting tt_id as t_id the other day when quickly looking at what might have to happen to re-implement importing but hadn't spotted this ticket...

Will need to remember this when reintroducing filtering, #15197.

Note: See TracTickets for help on using tickets.