Hi,
I have such a XML structure:
<vehicles>
<car>
<id>1</id>
<seats>6</seats>
<doors>4</doors>
...
</car>
<truck>
<id>2</id>
<wheels>12</wheels>
...
</truck>
...
</vehicles>
I want to import all vehicles with their own properties. So I set my context to "//vehicles" and seats-field to "seats". The problem is that a truck hasn't a node for seats. The parser handles it like a bug and doesn't import the truck. I received an error message for each failed import: Invalid data value given. Be sure it matches the required data type and format.
I don't want to you two different importers and I cannont change the XML-Files.
Is there a solution that a field gets the predefined default value if the mapped node isn't reachable? Feeds or the XPath processor should import the dataset without the missing value. So the predefined value of the field would be set. Or?
Comments
Comment #1
twistor commentedWhat are the other plugins/modules involved in this setup. This module doesn't handle setting the data, just parsing it.
Comment #2
Cebra commentedJust feeds, the importer and this Patch http://drupal.org/node/1033202 . Is it a Feature request for the ECK Feeds Patch? I need this feature. :-(
Or is there a workaround to use the predefined default value of a field, if no value was found after parsing?
Comment #3
Cebra commentedShall I open a request in the feeds project or feeds importer?
This issue is very urgent for my student project. :-(
Comment #4
Cebra commentedComment #5
Cebra commentedComment #6
Cebra commentedI tried to use Feeds Tamper in hope to set a value before saving. But the same error occurs.
Failed importing 26 feed entity helper.Which part of feeds throws this error?
Comment #6.0
Cebra commentedChanged example XML code
Comment #7
bluegeek9 commentedUnfortunately, Drupal 7 is End of Life and no longer supported. We strongly encourage you to upgrade to a supported version of Drupal.