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

twistor’s picture

Status: Active » Postponed (maintainer needs more info)

What are the other plugins/modules involved in this setup. This module doesn't handle setting the data, just parsing it.

Cebra’s picture

Just 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?

Cebra’s picture

Shall I open a request in the feeds project or feeds importer?

This issue is very urgent for my student project. :-(

Cebra’s picture

Project: Feeds XPath Parser » Feeds
Version: 7.x-1.0-beta3 » 7.x-2.x-dev
Cebra’s picture

Status: Postponed (maintainer needs more info) » Needs work
Cebra’s picture

I tried to use Feeds Tamper in hope to set a value before saving. But the same error occurs.

Failed importing 26 feed entity helper.

Invalid data value given. Be sure it matches the required data type and format.
Invalid data value given. Be sure it matches the required data type and format.
Invalid data value given. Be sure it matches the required data type and format.
... 
..
(occurs 26 times)

Which part of feeds throws this error?

Cebra’s picture

Issue summary: View changes

Changed example XML code

bluegeek9’s picture

Issue summary: View changes
Status: Needs work » Closed (outdated)
//www.flaticon.com/free-icons/thank-you Thank you for your contribution!

Unfortunately, Drupal 7 is End of Life and no longer supported. We strongly encourage you to upgrade to a supported version of Drupal.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.