CSV headers with extra space don't get mapped to correct fields

Created on 18 June 2020, over 4 years ago
Updated 11 June 2024, 9 months ago

I was having an issue where the import would fail and checking the item object on an afterParse event the headers of the csv were not being mapped accordingly.
It was a silly mistake on the csv or on the csv export that there was an extra space added by the end of some of the headers.

Adding a simple trim to the CsvParser solved the issue. I know it's very minor and stupid mistake, but this are hand made csvs and prone to mistakes so I want to make sure that my import won't run because of that. Couldn't find any other way of trimming/altering the headers before the import and it was so minor that wouldn't justify a custom Parser.

πŸ› Bug report
Status

Needs work

Component

Code

Created by

πŸ‡¨πŸ‡¦Canada bbombachini London, ON

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024