Hi,
I banging my head for some days to import data from an XML file to nodes. I'm using "Feeds XPath Parser" for this. It works like a charm and I have no problems when data is correctly specified inside the XML.
For testing I setup a content-type with some required text fields. When I import the data from the XML and one of the required fields is empty the node will be created. This happens also, if the title is empty.
I tested this also with 6.x-1.x-dev and other Parses (RSS, CSV) and the result is the same.
So my general question is: How are required fields handled?
If there is no way to rely on the parser or processor for such checks, then I will start and get my data right, that there are no empty values for required fields. But maybe I missed something in the documentation?!
It would be nice if anyone can give me a hint for that!
Best regards, Tom
Comments
Comment #1
scotjam commentedHi Tom,
Did you find an answer to your question on how to deal with required fields on import?
I'm looking to address the same issue.
cheers
scotjam
Comment #2
TomMynd commentedHi,
no... currently I do this step before saving / creating the XML for the import so that there are no required fields missing.
Best regards, Tom
Comment #3
scotjam commentedIs there any reason why the node rules are not applied?
Seem a bit weird to me! I wonder if Feeds Tamper or Rules or Views Bulk Operations could assist here.
cheers
Comment #4
TomMynd commentedGood point. I hoped to get an answer here. I've got to this problem when using Feeds XPath Parser in combination with Feeds Image Grabber.
I had an XML-file with links to images in the wild and a content type, that should be used to save these images inside an imagefield. Sometimes the download of the image failed, but the node was created without the image during import. The imagefield was a required field for that content type. So after looking at the code of "Image Grabber" I thought it would be better to ask this question here.
Best regards, Tom
Comment #5
scotjam commentedDon't think this is possible at the moment, so changing it to a feature request, hope that's okay!
Comment #6
twistor commentedI added a plugin to feeds_tamper that will stop a feed item from being saved if the selected field is empty. Hope this helps.
http://drupal.org/cvs?commit=490648
Comment #7
scotjam commentedBrilliant! Thank you!
Comment #8
danepowell commentedI'm not sure if this should be a bug report or feature request- but it definitely seems that required fields are not respected in Feeds 7.x-2.x.
Comment #9
franzThey are supposed to be that way. If you need the functionality, Feeds Tamper provides it.
Comment #10
tistou commentedtwistor,
Could you please tell which of the feed temper options allows me to stop node from being saved if the field is empty?
Thank you,