Unexpected behaviour with FAL relations in flexforms using workspaces
if you are using Flexforms with FAL relations in Workspaces, there is an error if you switch to a workspace and try to modify an existing content element (with FAL relations in a flexform) from the live workspace.Steps to reproduce this error:
- install the "flexform_test" extension (attached to this ticket)
- create a "Flexform Test" content element on any page and create a new image relation
- switch to another workspace and open the content element from the previous step
- save the content element
Now you will have the added image a second time (marked as a "New element!" / see screenshot).
#1 Updated by Online Now! GmbH almost 4 years ago
I can confirm this bug. It happens in one of our extensions for a customer. Also with the provided simple test extension in a clean TYPO3 6.2.15 installation.
Searching and digging trough the code, i couldnt find a cause for this, yet. My guess its somewhere in the DataHandler Class. FAL relations defined in TCA are working as expected.
When you have a FAL relation defined in TCA, exactly one copy of the reference with the label "Auto-created for WS #1" will be created. With a flexform FAL relation, there are two copies of the initial relation record. One with the label "INITIAL PLACEHOLDER", the other one with a label "First draft version". Both with a different sorting_foreign value. The recored with the "First draft version" label uses the ID of the placeholder in the t3ver_oid field.
I hope someone can use this information and work on a fix.