Bug #64621
Updated by Sascha Egerer almost 10 years ago
It is possible to create a FAL file relation even if the file extension is not allowed for this field.
Reproduce:
# Create a new image element
# Modify the "Add Image" button (using firebug e.g.) from something like
@setFormValueOpenBrowser('file', '|||gif,jpg,jpeg,tif,tiff,bmp,pcx,tga,png,pdf,ai|data-38-tt_content-173-image-sys_file_reference|inline.checkUniqueElement||inline.importElement'); return false;@
to
@setFormValueOpenBrowser('file', '||||data-38-tt_content-173-image-sys_file_reference|inline.checkUniqueElement||inline.importElement'); return false;@
# Click on open Image. You'll now be able to select any kind of file.
# select a non image file
# The file is visually added to the content element
# Save the record
Result:
You won't see that the records has been added what is the expected behavior.
But it is added. The relation is created in the database but not displayed in TCA as the file extension is not allowed.
Expected Result:
The relation should never be created by checking the file extension before creating the relation.