Workspaces and templavoia
We encountered an issue with using workspaces with templavoila in a Typo3 6.2.12. When linking a file, typing an email address into a text field or referencing an image in a templavoila FCE the "Workspaces" backend module fails to load the changes and quits with different error messages and makes the backend module unusable.
If you write an email address into a textfield the error message is 'Element
router _STRING:0" does not exist
If there is a reference to a file the message is
router Element "_FILE:0" does not exist
Or links to files
router Element "sys_file:1234" does not exist
This is because fields from tt_content with type flex get checked for child elements in table sys_refindex and those records are tried to be loaded from database. Those entries look like this (shortend):
tablename - field - ref_table - ref_uid - ref_string tt_content - tx_templavoila_flex - _STRING - 0 - firstname.lastname@example.org tt_content - tx_templavoila_flex - _FILE - 0 - uploads/tx_templavoila/example.jpg tt_content - tx_templavoila_flex - sys_file - 4120 -
These records are then tried to be fetched from database. The result is queries that try to acquire uid 0 from e.g. table _STRING which naturally will fail.
In case of links to files in FAL it fails because sys_file is not versionable.
I figured out a way to fix the errors so the workspace module is showing up correctly. Because workspaces and versioning are pretty hard to understand i'm not quite sure if this is the right approch.
The fix changes the two files typo3/sysext/version/Classes/Dependency/DependencyEntityFactory.php and typo3/sysext/version/Classes/Dependency/ElementEntity.php and adds a check if the table to be queried even exists and is also versionable before trying to load a referenced object.