Bug #66572

Workspaces and templavoia

Added by Klaus Moser over 6 years ago. Updated about 3 years ago.

Status:
Closed
Priority:
Should have
Category:
Workspaces
Target version:
-
Start date:
2015-04-24
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
Tags:
Complexity:
hard
Is Regression:
No
Sprint Focus:

Description

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 - test@example.com
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.


Files

patch.diff (2.38 KB) patch.diff Klaus Moser, 2015-04-24 14:46
patch-66572.diff (3.76 KB) patch-66572.diff Kay no-lastname-given, 2015-05-11 14:46

Related issues

Related to TYPO3 Core - Bug #66523: Refindex error for link wizard fields in flexformsClosed2015-04-21

Actions

Also available in: Atom PDF