Bug #59422
closedFlexform copyRecord, sys_file_reference inline post-copy filtering fails
0%
Description
Currently, the DataHandler class allows invalid values to be copied in XML without taking into consideration if such invalid values will, after copying, create an inoperable record which throws a FAL exception.
The exception No sys_file_reference found for UID is raised because the Filter class which filters by allowed file extension, will analyse the value of the XML node (the value being an integer number of references; actual relationship stored in sys_file_reference table). The Exception should indeed be thrown in this case - but the check for whether or not the Filter class should attempt to load the reference by UID is a bit too aggressive.
Current behaviour:
Value is assumed to be a compacted foobar_123 value which is split without checking for the presence of the separator character. This cause a value like "123" to be incorrectly processed.
Desired behaviour:
Filter class should only split and attempt to load-by-UID if the separator character is present, thus ignoring any unrecognised values.
Side note:
This issue is cause by incorrect processing of inline relations to sys_file_reference from within FlexForm data structures. This other problem causes records to be copied with a reference count still intact (desired behaviour: copy references and update the reference count, then ignore the field) and the solution would appear to be two parts; the first being this current issue and the next part being to trigger the correct file reference copying logic in TYPO3 when a record which has FlexForm data structure fields of inline type using sys_file_reference. If this current problem is not also solved, even solving the described other issue would still result in the FAL exception being raised.
Updated by Gerrit Code Review over 10 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/30632
Updated by Wouter Wolters almost 10 years ago
- Status changed from Under Review to Closed
Claus Due Jul 28 01:25
Abandoned
No longer required since solving the case that cased the unexpected value to be passed to this method. Abandoned in order to lighten the load of non-vital patches.