Closed (works as designed)
Project:
Feeds XPath Parser
Version:
7.x-1.0-beta2
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
19 Oct 2011 at 10:35 UTC
Updated:
31 Dec 2012 at 09:34 UTC
I'm trying to import users from an xml file.
The file is simple, name, surname, address, mail, ecc..
The debug of import permits me to see that the data are, in effect, correct. However, when data must be entered on mysql, I get an error:
SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' 'test1@test.com'' at line 1
I don't understand why!
My mapping proccessor:
xpathparser:0 User name
xpathparser:1 e-mail address
In import I set:
Context: //users//items
Username: //users//items//super002//surname
Mail: //users//items//emails//mail
User name missing or email not valid.
Original item
array (
'xpathparser:0' =>
array (
0 => 'username1',
1 => 'username2',
),
'xpathparser:1' =>
array (
0 => 'test@test.com',
1 => 'test1@test.com',
),
)
Entity
stdClass::__set_state(array(
'uid' => 0,
'roles' =>
array (
),
'status' => '1',
'feeds_item' =>
stdClass::__set_state(array(
'entity_id' => 0,
'entity_type' => 'user',
'id' => 'isis_import',
'feed_nid' => 0,
'imported' => 1319019203,
'hash' => '0c3eeb52d1d05a9b22b7bc4688621cff',
'url' => '',
'guid' => '',
)),
'created' => '1319026403',
'name' =>
array (
0 => 'username1',
1 => 'username2',
),
'mail' =>
array (
0 => 'test@test.com',
1 => 'test1@test.com',
),
))
Comments
Comment #1
arosboro commentedI have a similar issue trying to import an xml feed. Have you figured out what was causing this?
Comment #2
arosboro commentedNever mind. I figured out what was wrong. I was importing product SKUs, and the context wasn't set to the ProductSKU tag, it was set to the parent, ProductSKUs. Changing the context so that I didn't have to keep selecting ProductSKU and then the attribute or next tag fixed the error, and allowed items to be imported.
Comment #3
Robin Millette commentedComment #4
liad commentedI recently stumbled on the same problem and the problem still exists. I created an issue in the commerce_feeds issue queue, http://drupal.org/node/1876944.