[TYPO3-workspace] Versioning broken in 6.1

Vitoandre D'Oria doria at wiro-consultants.com
Fri Dec 20 21:38:23 CET 2013


Hello,

just coming from 4.5 to 6.x (starting to prepare for 6.2). Did there some things dramatically change when using Versioning because i am unable to use it in TYPO3 6.1.7 due to an error:

1: Record "New Version" (tt_content:19) cannot be swapped or published independently, because it is related to other new or modified records.

Replicate:
EXT:version installed (default!?), EXT:workspaces not installed
WEB > List > tt_content (Text) record > new version
Switching this new version to live creates the above error

Notes:
The behaviour can be replicated on a second server with 6.1.7 (vanilla install - no upgrades)
The mentioned record tt_content:19 was newly created (and was with nothing linked/copied expect the versioned record tt_content:20 that was afterward generated)


The problem seems to rely in typo3/sysext/version/Classes/DataHandler/CommandMap.php L:448 in the function:
\TYPO3\CMS\Version\DataHandler\CommandMap::applyWorkspacesDependencies()
L:458 $dependentElements = $dependency->getNestedElements($outerMostParent);
typo3/sysext/version/Classes/Dependency/ElementEntity.php L:271
\TYPO3\CMS\Version\Dependency\ElementEntity::getNestedChildren()
L:274 $children = $this->getChildren();
L:181 \TYPO3\CMS\Version\Dependency\ElementEntity::getChildren()
Inside there it uses sys_refindex to retrieve the related records.
We cleaned the refindex on both 6.1.7 installations also removed manually the related rows (they get rewritten as soon as you "try" to swap the version again)


The result in $dependentElements (debugged with \TYPO3\CMS\Extbase\Utility\DebuggerUtility::var_dump()):
array(2 items)
   tt_content:19 => TYPO3\CMS\Version\Dependency\ElementEntity prototype object
   : => TYPO3\CMS\Version\Dependency\ElementEntity prototype object see above

The process fails because of the second entry and the condition at L:467 in \TYPO3\CMS\Version\DataHandler\CommandMap::applyWorkspacesDependencies() which fails with the above error.

A quick fix would be to simply unset this buggy key (which has no table/uid)
if (isset($dependentElements[':'])) { unset($dependentElements[':']); }

The EXT:version code looks quite similar in 4.5/6.1.7 expect the file names so i am not sure where the problem lies.
I am the first one facing this problem?? I mean we almost got 6.2....However i am unable to find anything on the net :(

Hope someone from the WS/Vers Devs or someone with enough knowledge can shed some light?
Should this be bug-filled? A Forge Page /projects/show/typo3v4-workspaces exists but the tracker seems to be disabled so i guess i need to use the global one?



More information about the TYPO3-team-workspace mailing list