Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 299794

Skip on null with skip_on_empty instead of throwing an error

$
0
0

Problem/Motivation

If you want to skip on empty values, such as a NULL value - like SkipOnEmpty documents -, then you get an error "Did not save to map table due to NULL value for key field" instead of an ignored row/process.
So you can not actually skip a row/process on a NULL value.

(In my case, I'm using the spreadsheet source plugin from the migrate_spreadsheet module and my spreadsheet has an empty cell in a column that holds a required value, so I want to skip it when empty.)

Proposed resolution

Don't consider a NULL value as an indication of a problem, by default, in contradiction to what \Drupal\migrate\Plugin\migrate\id_map\Sql\saveIdMapping() currently mentions.

Check whether a process plugin allows a NULL value or - in the case of skip_on_empty - a process plugin wants to skip - not throw an error - on a NULL value.

Remaining tasks

Patch.

User interface changes

None.

API changes

None that I know of.

Data model changes

Does the sourceid1 column in migrate_map_* tables need to allow NULL values?


Viewing all articles
Browse latest Browse all 299794

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>