Problem/Motivation

This appears to be a recurrence of a past issue (Only importing title). Tried to import a CSV file and only the title field was imported with error log message:
/local/sites/dev.site.org/web/modules/contrib/contentimport/contentimport.module(429): _drupal_error_handler(8, 'Undefined index...', '/local/sites/de...', 429, Array)

Last working version is 8.x-4.1.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Comments

ksbuble created an issue.

therobyouknow’s picture

Following. Seeing this same issue as well in 8.x-9.3

therobyouknow’s picture

I would suggest trying another module - I found csv_importer to work.

I should note that if you intend to re-use your CSV that you attempted to import with contentimport, I'd advice making sure the langcode column is removed so that it works with csv_importer - I had to do that.

therobyouknow’s picture

johnnydarkko’s picture

Experiencing the same on 8.x-9.3.

There are various warnings in the watchdog log that look like there's some kind of blockage in the create_node call which is critical for this module to function.

notice    php             Notice: Undefined offset: 1 in create_node() (line 371 of /app/web/modules/contrib/contentimport/contentimport.module) #0 /app/web/core/includes/bootstrap.inc(600): _drupal_error_handler_r
notice    php             Notice: Undefined index: author in create_node() (line 429 of /app/web/modules/contrib/contentimport/contentimport.module) #0 /app/web/core/includes/bootstrap.inc(600): _drupal_error_handl
notice    php             Notice: Undefined index:  in create_node() (line 429 of /app/web/modules/contrib/contentimport/contentimport.module) #0 /app/web/core/includes/bootstrap.inc(600): _drupal_error_handler_re
notice    php             Notice: Undefined offset: 1 in create_node() (line 371 of /app/web/modules/contrib/contentimport/contentimport.module) #0 /app/web/core/includes/bootstrap.inc(600): _drupal_error_handler_r
notice    php             Notice: Undefined index: author in create_node() (line 429 of /app/web/modules/contrib/contentimport/contentimport.module) #0 /app/web/core/includes/bootstrap.inc(600): _drupal_error_handl
notice    php             Notice: Undefined index:  in create_node() (line 429 of /app/web/modules/contrib/contentimport/contentimport.module) #0 /app/web/core/includes/bootstrap.inc(600): _drupal_error_handler_rea

EDIT: These lines in contentimport.module refer to geolocation data that the module was expecting, but I left the fields blank in my csv. Still seems like it needs work or needs improvement to fail more gracefully. At the very least, there should be a check on line 371 and 429 to see if `$latlng` is empty.

johnnydarkko’s picture

Just for reference on #5: I created a separate ticket because this may solve the geolocation issue but OP might have a different issue: https://www.drupal.org/project/contentimport/issues/3245440