I have just managed to prove that there are two distinct issues on a new install - this is reproducible.

I also have this issue (https://drupal.org/node/2271393), which would led to the current understanding of the bug. I have separated the issues for clarity.

I have created a new Drupal install - http://dev-xpathtest.gotpantheon.com/ - core version 7.28

Installed the following:

CTools 7.x-1.4
Feeds 7.x-2.0-alpha8
Feeds Xpath Parser 7.x-1.0-beta4
Job Schedular - 7.x-2.0-alpha3

These are the current recommended releases for each of the required modules for a base install.

Steps to reproduce:

1) Created a content type 'WildStar Item'
2) Added a integer field, 'item_id'
3) Created a Feeds Importer
-- file upload, xml parser, node processor
-- node processor settings: bundle is 'WildStar Item', update existing is enabled.
-- node processor mappings: xpathparser:0 -> title (unique) , xpathparser:1 -> item_id
-- xpath settings:
Context: //N[@K='tItemDb']
title: N/N[@K='tItemInfo']/N[@K='tPrimary']/N[@K='strName']/@V
field_item_number: N/@F

The result is:

Debug:

xpathparser:0 :
V="Mutagen Shoulder Plates"
V="Schematic Thirsty Creek Hand Spikes"
V="The Desipient Collection"
V="Flaming Smoothie"
V="Granok Portrait (Draped)"
V="Banana"
V="Serviceable Platinum Shredder"
V="Galactium Isomodular Psystar"
V="Geometric Combat Assist Module"
V="Stormcrush Bladed Psybomb"
xpathparser:1 :
F="37671"
F="35979"
F="30406"
F="36491"
F="30662"
F="30790"
F="30918"
F="31046"
F="31174"
F="31302"

error:

Error message SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ' 'Schematic Thirsty Creek Hand Spikes', 'The Desipient Collection', 'Flaming Smo' at line 1

As you can see, the correct items are returned in the Xpath query.

Why is the title field the culprit ?

If you now set the title field to NOT unique, the SQL issue goes away.

HOWEVER, this is not a solution, as now on import all 10 nodes are imported as one node with a title of 'Array'.

I have also tried mapping the value 'N/@F' to GUID (which as you can see is unique for the 10 nodes in the sample, and setting GUID to unique.
Whilst setting GUID to unique does not cause the SQL issue, the uniqueness is ignored, and you still get 1 node with 'Array' as opposed to 10 unique nodes.

Additional Information:

I am unaware of where the handoff between XPath XML parser and feeds takes place, so I am unsure as to the primary issue queue this should be in.
This has also been tested with the latest --dev versions of each listed module, no observed difference in behaviour
Around 20 hours as been spent trying every conceivable permutation to date
This is reproducible on pantheon, local mac, and a 3rd party install.

XML File, debug output & Feeds Export attached.

I am desperate to get this working, any advice appreciated!

CommentFileSizeAuthor
feed_export.txt2.04 KBMizpah
debug.txt29.78 KBMizpah
LootVacuum_sample.xml_.zip4.44 KBMizpah
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Mizpah’s picture

Issue summary: View changes
Mizpah’s picture

Still having the same issue - can anyone shed any light? Everything on this project has ground to a halt now!

Mizpah’s picture

Still seeing the same behaviour - Am now going to need to try and find another solution as this project is paused!

twistor’s picture

Category: Bug report » Support request
Priority: Critical » Normal
Status: Active » Fixed

You have a problem with your XPath queries.
That debug output is incorrect. You should be seeing something like:

  • xpathparser:0 :
    • V="Mutagen Shoulder Plates"
  • xpathparser:1 :
    • F="37671"
  • xpathparser:0 :
    • V="Schematic Thirsty Creek Hand Spikes"
  • xpathparser:1 :
    • F="35979"

What's happening is that all of of the titles are being grouped into each node.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.