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

Comments

samy_msa created an issue. See original summary.

vuil’s picture

Version: 2.0.5 » 2.0.x-dev
Priority: Major » Normal
Status: Active » Postponed (maintainer needs more info)

Hello, could you attach a sample file. We can not reproduce the issue at all. Thank you.

byrond’s picture

StatusFileSize
new23.27 KB

We 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.

byrond’s picture

StatusFileSize
new559 bytes

Updated patch to include "application/csv".

byrond’s picture

StatusFileSize
new560 bytes

Updated patch from #4 to add missing parenthesis.

byrond’s picture

Status: Postponed (maintainer needs more info) » Needs review
vuil’s picture

Status: Needs review » Reviewed & tested by the community

  • vuil committed 5f8a9880 on 2.0.x authored by byrond
    Issue #3300149 by byrond, samy_msa, vuil: Mimetype 'text/csv' is ignored
    
vuil’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.