Title (title): This value should not be null.

Created on 7 April 2020, about 5 years ago
Updated 31 March 2023, about 2 years ago

I'm using Drupal core 8.8.4 with Feeds 8.x-3.x-dev (2020-Mar-29) on PHP 7.2.29.

One of my feeds does not use "Title" totally, because in our installation we are trying to use feeds to update content from different CSV files.
So, we have "field_id" (type: Text:plain) that's unique in our installation.

When I try to update nodes - the importer works, but there is also a notification:

An entity of type "content" failed to validate with the following errors:
Title (title): This value should not be null.
Please check your mappings.

How necessary is the use of a โ€œtitleโ€ in each importer's mapping, given that not only a title can be unique?

๐Ÿ’ฌ Support request
Status

Fixed

Version

3.0

Component

Code

Created by

๐Ÿ‡ง๐Ÿ‡พBelarus chegor

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia shubho8

    --SOLVED--
    You will get this error if the parser is not able to read the CSV file.
    Please check the delimiter, it can be , ; | ets.

    Open the csv file in a text editor or VS code to find out which delimiter you have to use.

    Hope it helps

  • ๐Ÿ‡ณ๐Ÿ‡ฟNew Zealand thomasmurphy

    I was getting this error on 8.x-3.0 on D11 with a csv which didn't have quoted values, eg

    one, two, three rather than "one","two","three"

    I reformatted a local csv copy with all cells quoted and it's successfully imports. I think the error handing for this kind of situation could be improved, it's not obvious that the first format is unsupported.

  • ๐Ÿ‡ณ๐Ÿ‡ฑNetherlands megachriz

    @thomasmurphy
    I have not tested it, but I think that one, two, three doesn't work because there are spaces used. So the column names effectively became "one", " two" and " three". " two" is not equal to "two", because the first one starts with a space and the second doesn't.

    In ๐Ÿ› CSV headers with extra space don't get mapped to correct fields Needs work there is being worked on a feature to ignore leading or closing spaces in CSV column names.
    There also exists an issue to implement a feature to detect mismatches in configured CSV column names vs actual CSV column names: โœจ Allow parsers to validate source before import Active .

  • ๐Ÿ‡ณ๐Ÿ‡ฟNew Zealand thomasmurphy

    @megachriz thanks, I was curious about this exact failure mode, so I double checked various csv formats. Unquoted UTF-8 actually imports fine, it was the fact that the original csv was UTF-16, and that when I had changed the format (in libre office) to be fully quoted, it defaulted to changing it from UTF-16 to UTF-8, which was what actually fixed the import error. Is this, perhaps a limitation of Drupal's database abstraction layer, rather than something the module should address?

    In any case, I'm not requesting that every file format be supported because there are a lot of edge cases. It's just that the error is quite unrelated to what's actually gone wrong. Even adding a note in the error to check your source file format would be helpful, rather than just stating that the title shouldn't be blank might be an easy step to improve things. eg "title cannot be blank. Try checking your source file format".

Production build 0.71.5 2024