Bug #88021
closedPreview of a record related with FAL does not work when file is changed in a workspace
100%
Description
Hi,
we used extbase to build an extension that show a record related with an image (managed via FAL).
We structured a model, adding a property "image" on model:
/**
* image
*
* @var \TYPO3\CMS\Extbase\Domain\Model\FileReference
* @cascade remove
*/
protected $image = null;
This the template fluid part, that use the image:
<f:uri.image image='{item.image}' />
When I add a record in the TYPO3 backend, workspace LIVE, all is ok.
The image is renderized well in backend, and in frotend.
After, an editor, in a workspace, edit that record and replace the LIVE image with an other image. Save the content.
When the page is showed in preview mode, appairs this error:
#1460976233: You must either specify a string src or a File object.
TYPO3Fluid\Fluid\Core\ViewHelper\Exception thrown in file
/var/www/typo3/sysext/fluid/Classes/ViewHelpers/Uri/ImageViewHelper.php in line 108.
This is the situation on database, in table 'sys_file_reference':
+--------+-----+-----------+----------+------------+---------------------+-------------+-----------+-------------+------------------+ | uid | pid | t3ver_oid | t3ver_id | t3ver_wsid | t3ver_label | t3ver_state | uid_local | uid_foreign | tablenames | +--------+-----+-----------+----------+------------+---------------------+-------------+-----------+-------------+------------------+ | 103489 | 467 | 0 | 0 | 0 | | 0 | 134760 | 1229 | tx_myext_mymodel | | 103490 | 467 | 0 | 0 | 2 | INITIAL PLACEHOLDER | 1 | 134767 | 1229 | tx_myext_mymodel | | 103491 | -1 | 103490 | 1 | 2 | First draft version | -1 | 134767 | 1229 | tx_myext_mymodel | | 103492 | -1 | 103489 | 1 | 2 | DELETED! | 2 | 134760 | 1229 | tx_myext_mymodel | +--------+-----+-----------+----------+------------+---------------------+-------------+-----------+-------------+------------------+
ID 1229 is the live content record uid (see column uid_foreign).
The WS records created after user update, should references the versioned record uid (ID=1230), but they reference the Live record uid. May be ?
The problem has been replicated on these TYPO3 versions:
TYPO3 8.7.24
TYPO3 9.5.5
Thank you,
Gianluca
Files