Support forums

Please check @brandnewbox_uk for support status updates.

Search     Advanced Search
Grid Field Import Error (creates rows when it shouldn’t)  
Posted: 27 February 2017 01:41 PM —  
Total Posts:  4
Joined  2013-12-20

When importing into a channel entry with Grid fields there is no option to ‘Do nothing’

At present the import either:

1. Deletes all grid rows
2. Appends rows onto existing
3. Attempts to update a row if a grid field matches

If you just want to update an existing channel entry which has a grid field but no action is needed on that grid field the import always adds a row to the grid with no data in it.

This causes problems because templates often check for grid rows and output content if a row exists - DG creates an empty row which it shouldn’t

An option is needed for ‘Do nothing to this grid field’

This is the case on other custom fields where if no value is submitted then no action is taken.

Posted: 02 June 2017 03:58 PM —   [ # 1 ]  
Total Posts:  2
Joined  2013-01-04

I am having this exact same issue.

I do not want any Grid rows created when importing channel data and an empty row is being created. This breaks the templating on the site. Someone has to go through each channel item and delete the empty row to fix the templating, which could be many rows.

There is a stack question with more details here.

Posted: 07 August 2017 01:59 PM —   [ # 2 ]  
Total Posts:  7
Joined  2011-06-23

An option is needed for ‘Do nothing to this grid field’

I’ve just done this in the grid fieldtype for Datagrab v.1.8.0.

Before you use, make sure you’ve got backups. If you change this on your site, then responsibility for whatever happens next is up to you.

If you’re on the right version of Datagrab - 1.8.0 - then replace the existing fieldtype here:


with the one in the zip file here (unzip to get it of course):

The logic for other versions of Datagrab is likely to be similar - I’ve not checked.

Changes are in lines 104 and 204.
Line 104 added option value of -2 to dropdown to “Keep existing rows and ignore import”
Line 204 added conditional to check for that value and replace newly added $grid with $old version just retrieved which contains the original instead.

Andrew, if you read this, please feel free to integrate these updates into your build(s).




Posted: 09 August 2017 08:50 AM —   [ # 3 ]  
Total Posts:  1328
Joined  2006-04-12

Hi Aidann,

Thanks for your post. I’m working on an update that I’m hoping to release shortly. I’ll take a look at your solution - thanks.

The issue where a new row was always added was a bug that should be fixed in the next version.



‹‹ Importing UTF-8 Characters via CSV fails      Fatal error: Maximum execution time exceeded ››

Select A Theme