Problem/Motivation
Cannot import taxonomies using CSVs.
Steps to reproduce
Upload a CSV (PHP Version 8.1.4) and you'll get the 'Failed to open the file' message.
Proposed resolution
Allow 'text/csv' mimetype
Remaining tasks
Review
User interface changes
None
API changes
None
Data model changes
None
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | text-csv-mimetype-3300149-5.patch | 560 bytes | byrond |
| #4 | text-csv-mimetype-3300149-4.patch | 559 bytes | byrond |
| #3 | location-taxonomy.csv_.txt | 23.27 KB | byrond |
| mimetype.patch | 509 bytes | samy_msa |
Comments
Comment #2
vuilHello, could you attach a sample file. We can not reproduce the issue at all. Thank you.
Comment #3
byrond commentedWe received the same error when using this module to import taxonomy. The patch on this issue would fix the problem for us, but it doesn't consider `application/csv`, which was also recently added in #3255009-6: CSVs not detected properly.
CSV is attached. Using Drupal 9.4.8 with DDEV 1.21.1, which the web server may handle MIME types differently than other local devel environments.
Edit: The CSV originally had a ".csv" suffix. It was renamed for upload on d.o.
Comment #4
byrond commentedUpdated patch to include "application/csv".
Comment #5
byrond commentedUpdated patch from #4 to add missing parenthesis.
Comment #6
byrond commentedComment #7
vuilComment #9
vuil