Bug #103178
closedAllowed file extensions not working after last patch
100%
Description
Since the last Version 12 Patch the Settings for the allowed Files is not working properly anymore on "Create new Relation"
The end of the list of allowed files is cut off and ";DIS" is attached at the end of the list
So "*" becomes ";DIS"
And "GIF JPG JPEG TIF TIFF BMP PCX TGA PNG PDF AI SVG MP4 DOCX PPTX ZIP XLS XLSX" becomes "GIF JPG JPEG TIF TIFF BMP PCX TGA PNG PDF AI SVG MP4 DOCX PPTX ZIP XLS XLSX;DIS"
If i revert this commit here it works again:
https://github.com/typo3/typo3/commit/0cb86f3123#diff-cc09d3ba88ae5c071517f75cc7a758fa92068b59bf83bd72406212c25bbd2c20
I have the problems for Standard "File List" CEs and Custom Mask Elements.
Files
Updated by Oliver Bartsch 6 months ago
- Status changed from New to Needs Feedback
Hi,
thanks for creating this issue. Unfortunately, I was not able to reproduce this. Could you therefore please share corresponding TCA configuration and also the values of $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext']
and $GLOBALS['TYPO3_CONF_VARS']['SYS']['mediafile_ext']
?
Best, Oli
Updated by Manuel Winkelhofer 6 months ago
Hi,
no problem happy to help.
imagefile_ext
gif,jpg,jpeg,tif,tiff,bmp,pcx,tga,png,pdf,ai,svg,mp4,docx,pptx,zip
mediafile_ext
gif,jpg,jpeg,bmp,png,pdf,svg,ai,mp3,mp4,flac,opus,webm,youtube,vimeo
Updated by Oliver Bartsch 6 months ago
- Related to Bug #102992: Selecting files not always possible added
Updated by Gerrit Code Review 6 months ago
- Status changed from Needs Feedback to Under Review
Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/83170
Updated by Oliver Bartsch 6 months ago
Hi,
thanks for the information. I however still can not reproduce this as the new delimiter is used by TYPO3. This therefore seems you either are using some old links to open the FileBrowser or an extension does create links with the old syntax. However I pushed a patch, respecting the old delimiter again for backwards compatibility. If possible, it would be great if you could test the patch.
Best, Oli
Updated by Manuel Winkelhofer 6 months ago
i copied the relevant code into the file and i can select the correct files again.
but i get the following error/notification in the file selector:
Core: Error handler (BE): PHP Warning: Undefined array key 0 in /var/www/html/vendor/typo3/cms-filelist/Classes/ElementBrowser/FileBrowser.php
on this line: [$allowed, $disallowed] = GeneralUtility::trimExplode(';disallowed=', $allowed, true, 2);
but that error is maybe because you are working in the main branch (13) it seems. my affected project is v12
some debug info from me, maybe it helps:
for filelist ce where it sould be a
$fileExtensions*
array(1 item)
0 => 'allowed=;disallowed=' (20 chars)
$allowed
';disallowed=' (12 chars)
for the mask element
$fileExtensions
array(1 item)
0 => 'allowed=gif,jpg,jpeg,tif,tiff,bmp,pcx,tga,png,pdf,ai,svg,mp4,docx,pptx,zip,x
ls,xlsx;disallowed=' (95 chars)
$allowed
'gif,jpg,jpeg,tif,tiff,bmp,pcx,tga,png,pdf,ai,svg,mp4,docx,pptx,zip,xls,xlsx;
disallowed=' (87 chars)
Updated by Oliver Bartsch 6 months ago
- Status changed from Under Review to Needs Feedback
Hi, thanks for the feedback.
It would still be interesting to know where this link comes from, because TYPO3 does not create the bparams
with the ;
delimiter anymore.
Could you therefore please check, where this link is generated? In the best case you could provide the backtrace here.
Best, Oli
Updated by Gerrit Code Review 6 months ago
- Status changed from Needs Feedback to Under Review
Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/83170
Updated by Gerrit Code Review 6 months ago
Patch set 1 for branch 12.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/83180
Updated by Gerrit Code Review 6 months ago
Patch set 2 for branch 12.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/83180
Updated by Gerrit Code Review 6 months ago
Patch set 3 for branch 12.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/83180
Updated by Manuel Winkelhofer 6 months ago
first of all the patch fixes the problem for me for now.
thanks for that.
im not quite sure how and what debug info i can send you so that it's useful for you
in the ElementBrowser.php in the render function
the value for $linkAttributes at the end is:
class => 't3js-element-browser' (20 chars)
data-mode => 'db' (2 chars)
data-params => 'data[tt_content][3575][file_collections]|||sys_file_collection|' (63 chars)
Updated by Oliver Bartsch 6 months ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 50b6c74db38058768c5c2fd73e99ce363bcc748c.