Make WordPress Core

Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#32104 closed defect (bug) (fixed)

Import of data into database (starting from 4.1.2) fails

Reported by: ewerkstatt's profile ewerkstatt Owned by: ocean90's profile ocean90
Milestone: 4.2.2 Priority: normal
Severity: normal Version: 4.1.2
Component: Database Keywords: fixed-major
Focuses: Cc:

Description

We created a plugin which imports data from an XML-file (UTF-8) into the WP-database (collation utf8_general_ci) using $wpdb->query("CREATE ....");.

Since version 4.1.2 the import fails due to the usage of german umlauts in field names. The problem persists also in 4.1.3.

The import is possible using wp-includes/wp-db.php from version 4.1.1.

Change History (11)

#2 @pento
9 years ago

  • Milestone changed from Awaiting Review to 4.2.1

Note for when I look at a fix for this: it's probably failing because wpdb::strip_invalid_text_from_query() fails if the table doesn't exist, which it won't for a CREATE query.

I'm inclined to skip the check for queries that don't return user data, as we do with wpdb::check_safe_collation(). (Though with CREATE added to the regex, of course.)

This will need to be backported to 3.7.

#3 @pento
9 years ago

In 32374:

WPDB: When sanity checking query character sets, there's no need to check queries that don't return user data.

See #32104.

#4 @pento
9 years ago

In 32377:

WPDB: When sanity checking query character sets, there's no need to check queries that don't return user data.

Merges [32374] to the 4.2 branch.

See #32104.

#5 @samuelsidler
9 years ago

  • Keywords fixed-major added

#6 @ocean90
9 years ago

In 32402:

WPDB: When sanity checking query character sets, there's no need to check queries that don't return user data.

Merges [32374] to the 4.1 branch.

props pento.
see #32104.

#7 @ocean90
9 years ago

In 32403:

WPDB: When sanity checking query character sets, there's no need to check queries that don't return user data.

Merges [32374] to the 4.0 branch.

props pento.
see #32104.

#8 @ocean90
9 years ago

In 32405:

WPDB: When sanity checking query character sets, there's no need to check queries that don't return user data.

Merges [32374] to the 3.9 branch.

props pento.
see #32104.

#9 @ocean90
9 years ago

In 32406:

WPDB: When sanity checking query character sets, there's no need to check queries that don't return user data.

Merges [32374] to the 3.8 branch.

props pento.
see #32104.

#10 @ocean90
9 years ago

  • Owner set to ocean90
  • Resolution set to fixed
  • Status changed from new to closed

In 32407:

WPDB: When sanity checking query character sets, there's no need to check queries that don't return user data.

Merges [32374] to the 3.7 branch.

props pento.
fixes #32104.

#11 @ewerkstatt
9 years ago

Uuuuuuh, works again!

Thank you guys and dolls!

Note: See TracTickets for help on using tickets.