When i tired import contetnt it write:
"title or langcode is missing in CSV file. Please add these fields and import again"
It works with php 5.6?

CommentFileSizeAuthor
#12 article.csv_.txt142 bytesKwadz
#8 article.txt110 bytescolinstables
#8 csv-articles.txt12.65 KBcolinstables
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

VasyOK created an issue. See original summary.

dhayanandan_k’s picture

@VasyOK.. yes it is working.. please include title and langcode columns in csv file. These are mandatory.. Try again please

dhayanandan_k’s picture

Status: Active » Closed (works as designed)
VasyOK’s picture

Thanks! Why langcode is requered?
Sory, not works. Only titles are imported

Anonymous’s picture

The .csv I had to work with had no langcode column and I wouldn't be allowed to add one for the specific task I was undergoing. I found removing the “langcode” parts of the code in the module on worked fine when it came to generating nodes. I was using core 8.3.7

M.E.B.’s picture

When using the `Content_Import_Sample.csv` for the article content type you get the reported error because the sample CSV file is missing a langcode column. Adding this column and an appropriate language code like 'en' as the data allows for successful import of the sample file. Maybe update the sample CSV file to include a langcode column?

djilymbow01’s picture

title or langcode is missing in CSV file. Please add these fields and import again how to solve this problem ???

colinstables’s picture

Assigned: Unassigned » colinstables
Category: Task » Support request
Priority: Normal » Major
Status: Closed (works as designed) » Active
FileSize
12.65 KB
110 bytes

Hi, Can some one please help I'm pulling my hair out here. I have used the example file and my own CSV file and still get the error message: "title or langcode is missing in CSV file. Please add these fields and import again"

Fixed it was the delimiter :)

colinstables’s picture

StephanieFuda’s picture

I'm also having this issue - The sample file I downloaded has both title and langcode columns but the file will not load.
I'm on Drupal 8.5.6 and php 7.27. Is there anything else I should try?

Thanks!

dejahvuuu’s picture

Hi,
I also had the problem and it worked for me:

based on the answer of this issue:
https://www.drupal.org/project/contentimport/issues/2940753

Place the following in my csv file downloaded from the example file that the module generates:

File CSV:
-------------------------------------------------- ----------------------------
title, langcode, promote, field_ciudades, field_direccion
-------------------------------------------------- ----------------------------
,,,,
-------------------------------------------------- ----------------------------
Colombian Optics Éxito América, es, On, cities: Bogotá, Avénida # 68 A- 94
----------------------------------------------------------------------------------
Óptica Colombiana Éxito 80, es, On, cities: Bogotá, Carrera 59 A # 79 - 30

The second column with the empty spaces makes it work

It is a solution

Kwadz’s picture

FileSize
142 bytes

Just took the generated file and added a new line WITH title and langcode. I got the error "title or langcode is missing in CSV file. Please add these fields and import again".

Please find attached the file, there is something wrong.

Using Drupal 8.5.6

drupalnesia’s picture

Version: 8.x-3.2 » 8.x-4.1
Status: Active » Fixed

This issue happen pn 8.x-3.2. I just try 8.x-4.1 and working file.
The module instruction was wrong:

"Make sure the first row of the CSV file having machine name as columns. This is required to match the data with content type"

You don't need to specify Content Type machine name at first row.

Just download sample CSV. Look at my example CSV like this:

title,langcode,promote,body
Anchor,en,0,
Arrow,en,0,
Avery Publishing Group,en,0,
Back Bay Books,en,0,
Bloomsbury,en,0,
Bluebird - Pan Macmillan,en,0,
Broadway Books,en,0,
Clarkson Potter Publishers,en,0

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

Javier del Pozo’s picture

Hi, I have drupal 8.6.10
when Idownload a template for a content type, this template include nid,type,uid,status,langcode, and the rest of the elements of my content tipe,
but I down now what info put in this fields, and only register the title when import the cvs to drupal :( I reed all the issues but i cant solve, someone have a issue like this?

sry, my english is not good