All add-ons currently require PHP 7.4 or greater.

On July 4th 2024 PHP 8.2 will be the new minimum requirement for all add-ons. Expect any add-on released after that date to require 8.2 or greater. Some releases may not immediately take advantage of 8.x specific features in PHP, which means you might, be able to continue using new releases in PHP 7.4, however, if you experience an error the first thing you should do is update to PHP 8.2 then create a support ticket if the error persists.

Please read about the changes to BoldMinded add-on licensing.

Ticket: Import appears to work, but no entries created?

Status Resolved
Add-on / Version DataGrab 5.0.3
Severity
EE Version 7.3.8

NewMediaDrive.com

Jul 23, 2023

Hello,

I’m attempting to use DataGrab to import some CSV data, but it isn’t working. I’ve followed the troubleshooting instructions (https://docs.boldminded.com/datagrab/docs/troubleshooting), and checked the log file. There were some initial issues with some of the data in the CSV file being invalid, with error messages to that effect in the logs* - so I tested by just removing that data from the import file. After doing that, I re-tried the import, and the log file now seems to indicate that it the import succeeded - but when I check the channel that it’s supposed to be importing to, there are no actual entries created from the import:

20:33:58 07/23/2023 ======== ENV ========
20:33:58 07/23/2023 max_execution_time: 90
20:33:58 07/23/2023 max_input_time: 240
20:33:58 07/23/2023 max_input_vars: 1000
20:33:58 07/23/2023 memory_limit: 1G
20:33:58 07/23/2023 type: csv
20:33:58 07/23/2023 channel: 2
20:33:58 07/23/2023 limit: 1000
20:33:58 07/23/2023 id: 1
20:33:58 07/23/2023 passkey: [redacted]
20:33:58 07/23/2023 site_id: 1
20:33:58 07/23/2023 filename: [redacted]
20:33:58 07/23/2023 delimiter: ,
20:33:58 07/23/2023 encloser: “
20:33:58 07/23/2023 skip: 1
20:33:58 07/23/2023 update: y
20:33:58 07/23/2023 author: 1
20:33:58 07/23/2023 author_field:
20:33:58 07/23/2023 author_check: screen_name
20:33:58 07/23/2023 offset: 0
20:33:58 07/23/2023 title: 0
20:33:58 07/23/2023 title_suffix:
20:33:58 07/23/2023 url_title:
20:33:58 07/23/2023 url_title_suffix:
20:33:58 07/23/2023 date: 3
20:33:58 07/23/2023 expiry_date:
20:33:58 07/23/2023 timestamp: imported_timestamp
20:33:58 07/23/2023 delete_old: n
20:33:58 07/23/2023 status: open
20:33:58 07/23/2023 update_status:
20:33:58 07/23/2023 c_groups:
20:33:58 07/23/2023 update_edit_date: y
20:33:58 07/23/2023 soft_delete: n
20:33:58 07/23/2023 ====== END ENV ======
20:33:58 07/23/2023 QUEUING
20:33:58 07/23/2023 WAITING
20:33:58 07/23/2023 Starting new import consumer.
20:33:58 07/23/2023 RUNNING
20:33:58 07/23/2023 Begin Importing [V1 Report 666]
20:33:58 07/23/2023 [V1 Report 666] is a new entry.
20:33:59 07/23/2023 Entry added
20:33:59 07/23/2023 ImportItem PID: 22008
20:33:59 07/23/2023 RUNNING
20:34:02 07/23/2023 WAITING
20:34:02 07/23/2023 WORKER STOPPED: success
20:34:02 07/23/2023 COMPLETED
20:34:02 07/23/2023 Added 1 entries
20:34:02 07/23/2023 Clearing all cache


*The initial errors in the log file were along the lines of “mport error with entry V1 Report 666 with the field_id_9 field: Invalid Selection” - it might be worth noting in the documentation that the “field_id_X” references are referring to the CHANNEL field by its ID, and not the COLUMN in CSV data. And it might also be worth noting that for fields using “Value/Label Pairs,” the data in the CSV can’t be imported if it matches the “Label” for the corresponding file option, and apparently needs to match the “Value” instead.

#1

BoldMinded (Brian)

Can you please share screenshots of your import settings? Thanks.

#2

NewMediaDrive.com

Comment has been marked private.

#3

BoldMinded (Brian)

And can you share the import file you’re using? A link to it is fine.

#4

NewMediaDrive.com

Comment has been marked private.

#5

BoldMinded (Brian)

Comment has been marked private.

#6

NewMediaDrive.com

Comment has been marked private.

#7

NewMediaDrive.com

Comment has been marked private.

#8

BoldMinded (Brian)

I would clone the current import and remove some of the mappings and see if the import starts working. Maybe one of the mappings is causing an issue, but we need to figure out which one it is.

#9

NewMediaDrive.com

Comment has been marked private.

#10

BoldMinded (Brian)

I would check your server’s timezone settings. Also if you’re importing dates into fields other than entry_date and expiration_date, then I’d take a look at the actual custom field’s settings. DataGrab, for those fields, just accepts whatever value you send it, so if the value is changing, then it is likely happening on the EE side when it’s saving the field.

#11

NewMediaDrive.com

Hello,

Just wanted to follow-up and confirm that I was able get it working & have successfully imported the data that I needed to.

I’m still not entirely sure what the original problem was, but it looks like it was due/related to the earlier quirk I noticed with field options: as far as I can tell, if even a single column in the CSV data contains even a single option that doesn’t exactly match one of the options for that field in the field’s settings, then none of the other data for that entry gets imported & the entry itself doesn’t get created by the import. Is that correct?

#12

BoldMinded (Brian)

I’m going to be honest I have no idea what this sentence means.

even a single column in the CSV data contains even a single option that doesn’t exactly match one of the options for that field in the field’s settings

What options and settings are you referring to? Can you provide specific examples?

Login to reply