Closed (fixed)
Project:
FileField Sources
Version:
8.x-1.x-dev
Component:
Source: Attach (FTP)
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
7 Jan 2020 at 14:01 UTC
Updated:
7 Feb 2020 at 15:39 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
gooddenis commentedThe problem was on render a select list element. Before the first space drupal added " symbol.
Comment #3
shadowwolf218 commentedI was having the same issue.
The patch provided appears to have fixed it completely.
Thanks!
Comment #4
gnugetI tried to replicate this problem without luck.
Can you please provide a list of steps to replicate the bug?
Thanks!
Comment #5
shadowwolf218 commentedI can't speak to OP's exact issue, but I suspect it looked much like mine.
(Drupal 8.8.1, Filefield Sources 8.x.1.x-dev)
Of course, pre-steps would be "install module with composer" and "install module from "Extend" list in Drupal."
- configure form display to allow "attach" as an upload method
- in my case, I am using this with existing Media field: Audio so I'll use that as the example
- set upload directory path and confirm allowed filetypes: mp3 aac wav
- upload via FTP (Filezilla, in case it matters): Test File.mp3 and Test_File.mp3
- navigate to "Add Media Item" and select Audio
- "File attach" appears next to "Upload"
- select "File attach," dropdown menu appears
- both files appear in dropdown menu
- select Test File.mp3, click Attach
- error =>
<em class="placeholder">File</em>is not an allowed filetype (mp3 aac wav). Illegal choice detected, please contact site administrator.(I don't remember this as exactly as I'd like, but note the filename has been changed.)
- select Test_File.mp3, click Attach
- attach succeeds, file "upload" succeeds, file appears in media list
I thought the issue was happening during filename munging or transliteration, but that clearly wasn't the case.
Hope this helps.
Comment #6
gnugetThanks for your help @shadowwolf218 !
I was able to reproduce the problem thanks to you and I wrote a test so we can avoid any regression in the future.
Patch and tests attached.
Comment #8
gnugetComment #9
gnuget