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
Updated by Georg Ringer over 5 years ago
- Subject changed from Preview of a record related with FAL does not work when file is changed in a worskpace to Preview of a record related with FAL does not work when file is changed in a workspace
Updated by Danilo Caccialanza over 4 years ago
- Tags changed from workspace, TYPO3 8.7, TYPO3 9 to workspace, TYPO3 8, TYPO3 9, TYPO3 10
I can confirm that the problem is still present also on the version 9.5.18 and 10.4.3.
To baypas the problem, we had to develop an external viewhelper to render the image...
Updated by Danilo Caccialanza over 4 years ago
- File ImageViewHelper.php ImageViewHelper.php added
- File List.html List.html added
I enclose an example of a viewhelper to bay the problem, but it would be nice if the problem was solved in the core :)
Works for v8 and v9.
Updated by Gerrit Code Review over 3 years ago
- Status changed from New to Under Review
Patch set 11 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/68913
Updated by Danilo Caccialanza over 3 years ago
I confirm that https://review.typo3.org/c/Packages/TYPO3.CMS/+/68913 solves this issue, tested with TYPO3 10.4.15 with tag “<f:uri.image”.
Updated by Gerrit Code Review over 3 years ago
Patch set 12 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/68913
Updated by Gerrit Code Review over 3 years ago
Patch set 13 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/68913
Updated by Gerrit Code Review over 3 years ago
Patch set 14 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/68913
Updated by Gerrit Code Review over 3 years ago
Patch set 1 for branch 10.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70215
Updated by Benni Mack over 3 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset a1f22a427f3bc49ab3fc3424859a7e2d7beaa1c9.
Updated by Christian Kuhn almost 3 years ago
- Related to Feature #90072: Make inline TCA fields workspace-transparent for Extbase (foreign_field and foreign_sortby) added
Updated by Benni Mack about 2 years ago
- Related to Bug #89456: Translations of IRRE Extbase Records in Workspaces not saved added
Updated by Benni Mack 8 days ago
- Related to Bug #99244: DataMapper uses a lot of memory when retrieving MM-relations in workspaces added