Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Every time I try to import (Content > Feeds) it produces this error:
The content Party failed to validate with the error: This value should not be null. Please check your mappings.
Set up for Feed:
RSS parser
Node processor
other settings do not seem to matter what I choose, the result is the same.
I have attempted this on 2 different RSS feeds, both with same result.
Comment | File | Size | Author |
---|---|---|---|
#9 | import_is_producing_an-2833448-9.patch | 1.45 KB | wolffereast |
#7 | feed-config-export.txt | 812 bytes | andreayaya |
#4 | Screen Shot 2016-12-21 at 2.31.31 PM.png | 107.22 KB | daboo |
#3 | Screen Shot 2016-12-19 at 2.52.37 PM.png | 38.12 KB | andreayaya |
Comments
Comment #2
daboo CreditAttribution: daboo as a volunteer commentedCan you attach a screenshot of your mappings and include the URL for the feeds that you are trying to grab?
Comment #3
andreayaya CreditAttribution: andreayaya commentedURL: http://www.goodhousekeeping.com/rss/holidays.xml
Mappings attached.
Comment #4
daboo CreditAttribution: daboo as a volunteer commentedandreayaya,
Looking at your mappings, I think you should be able to change your "source -> title" to be "source -> Feed Title". The "Title" is the title that displays at the beginning of the feed, while the "Feed Title" is what is displayed for each entry. I'd be careful about using this as your unique field and recommend using the "guid" as your unique field even if you do not display it.
I've attached an example of a mapping that I am using for reference.
I hope this helps.
Best Regards,
Daboo
Comment #5
MegaChriz CreditAttribution: MegaChriz as a volunteer commented@daboo
Actually, it is the other way around. "Title" is the title or name of each entry in the RSS feed, while "Feed title" is the name of the channel.
I don't think there is anything wrong with the mapping. I guess it would be more useful to see an export of the whole feed type. You can export the feed type at admin/config/development/configuration/single/export. There for 'Configuration type' select 'Feed type' and for 'Configuration name' the name of the feed type. Attach the result here as a text file.
Comment #6
daboo CreditAttribution: daboo as a volunteer commentedDoh! My bad. Thanks for the correction MegaChriz.
Comment #7
andreayaya CreditAttribution: andreayaya commentedAttached is the export. I did try (after this export) using GUID but the same errors appeared.
Comment #8
MegaChriz CreditAttribution: MegaChriz as a volunteer commented@daboo
Do you want to try to reproduce this issue? I'm currently focussed on other Feeds issues.
Comment #9
wolffereast CreditAttribution: wolffereast commentedI think this might be easier to deal with if we add some slight improvements to the error message. Attaching a patch that prints all the validation errors instead of just the first and includes the fields if applicable. I'm getting odd behavior with all the html in the message, but thats not new.
@andreayaya if you apply this patch and attempt to use the feed does it give you enough information to debug?
Comment #10
MegaChriz CreditAttribution: MegaChriz as a volunteer commented@wolffereast
I've opened an issue for improving the error message that is shown when entity validation fails: #2868073: EntityProcessorBase::entityValidate(): add more context to error message if validation fails. The patch there does something similar as your patch in #9. Would love feedback!
Comment #11
MegaChriz CreditAttribution: MegaChriz as a volunteer commentedSee also #2888258: Feeds says entry is null when populated.
Comment #12
MegaChriz CreditAttribution: MegaChriz as a volunteer commentedTry the patch from #2868073: EntityProcessorBase::entityValidate(): add more context to error message if validation fails in order to provide more context about the reported error.
Comment #13
MegaChriz CreditAttribution: MegaChriz as a volunteer commentedNo further info provided.
Comment #14
qproI get same error trying to import a CSV file.
"An entity of type "contido" failed to validate with the following errors:
Punto de interese (title): This value should not be null.
Please check your mappings."
But I don't get the error if I change my csv file delimiters from "," to ";"
my configuration:
langcode: gl
status: true
dependencies:
config:
- core.base_field_override.node.punto_de_interes.title
- field.field.node.punto_de_interes.body
[...]
- node.type.punto_de_interes
module:
- geofield
- node
label: 'Importador de Contidos Puntos de Interese'
id: importador_de_contenido_poi
description: ''
import_period: -1
fetcher: upload
fetcher_configuration:
allowed_extensions: 'txt csv tsv xml opml'
directory: 'public://feeds'
parser: csv
parser_configuration:
delimiter: ;
no_headers: false
line_limit: 100
processor: 'entity:node'
processor_configuration:
update_existing: 2
update_non_existent: _keep
expire: -1
owner_feed_author: false
owner_id: 1
authorize: true
skip_hash_check: false
values:
type: punto_de_interes
custom_sources:
nombre_poi:
label: Nombre
value: Nombre
machine_name: nombre_poi
descripcion_poi:
label: Descripcion
value: Descripcion
machine_name: descripcion_poi
[...]
mappings:
-
target: title
map:
value: nombre_poi2
unique: { }
-
target: body
map:
value: descricion_poi
summary: ''
settings:
format: full_html