- Issue created by @megachriz
Sometimes users make errors in the naming of columns when supplying a CSV file. The used column names then don't match with those specified on the mapping form. This creates unnecessary frustation for the user: they either get validation errors for every imported item (for example if the column name for a required field was misspelled) or they wonder why data for a certain field wasn't imported.
title,description
Foo,Lorem Ipsum Dolor Sit Amet
In the above case, the column that was meant for the Body field is called "description" instead of "body" and as a result no value for the Body field is imported.
When clicking the "Import" button on /feed/x/import:
In follow-up issues we could also think about how to apply this type of validation on other places where a user can start an import:
But for now, I think we better limit the focus on the import form at /feed/x/import.
This is what I think should be coded to get the proposed solution.
\Drupal\feeds\Feeds\Parser\CsvParser
would implement this interface.\Drupal\feeds\Form\FeedImportForm
needs to check on submit if the selected parser implements the added interface. If not, it starts the import like it does now.\Drupal\feeds\FeedImportHandler
?TBD.
After clicking "Import" on /feed/x/import, the user would see a warning when there are validation issues. The user would see a button called "Continue import". Clicking this button would ignore the validation issues and continues the import.
TBD.
None.