Bug #77735
closedEditing of content with image does not work in workspace
100%
Description
When I try to edit a tt_content record with an image, I get the following exception:
#1437656456: $uid must be positive integer, 0 given
(Current master: 3523358c681dc86ee6bce44f67a6871b5eca5688)
Steps to reproduce:
1. Add an element with image in Live-Workspace
2. Change to Draft Workspace
3. Try to edit the record.
This happens, because there are no translated records of the sys_file_reference, when initially editing the record. Then TceInline::getWorkspacedUids will try to get the workspace uids of the images and performs and incorrect check:
https://github.com/TYPO3/TYPO3.CMS/blob/084bc6a6da568f010e0fc6af610893f8d6ff8b57/typo3/sysext/backend/Classes/Form/FormDataProvider/TcaInline.php#L397
$workspaceVersion is null instead of false.
This bug was introduced with #75650:
https://github.com/TYPO3/TYPO3.CMS/commit/e615411ba877dcde9c032324d3a6f7a03a711b97#diff-3d624d5308ae522bc421e473694172ceL3969
BackendUtility::getWorkspaceVersionOfRecord previously returned false instead of null, when a workspace record did not exist.
Updated by Gerrit Code Review over 7 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/49713
Updated by Wouter Wolters over 7 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 2c54946fa050ca3cfaa085791c93475b7d03d52b.