Project

General

Profile

Actions

Bug #88021

closed

Preview of a record related with FAL does not work when file is changed in a workspace

Added by Gianluca Strafella over 5 years ago. Updated about 3 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Workspaces
Target version:
-
Start date:
2019-03-27
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
9
PHP Version:
7.2
Tags:
workspace, TYPO3 8, TYPO3 9, TYPO3 10
Complexity:
Is Regression:
Sprint Focus:

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

ImageViewHelper.php (5.69 KB) ImageViewHelper.php Danilo Caccialanza, 2020-06-05 09:41
List.html (740 Bytes) List.html Danilo Caccialanza, 2020-06-05 09:41

Related issues 3 (1 open2 closed)

Related to TYPO3 Core - Feature #90072: Make inline TCA fields workspace-transparent for Extbase (foreign_field and foreign_sortby)Closed2020-01-09

Actions
Related to TYPO3 Core - Bug #89456: Translations of IRRE Extbase Records in Workspaces not savedClosed2019-10-18

Actions
Related to TYPO3 Core - Bug #99244: DataMapper uses a lot of memory when retrieving MM-relations in workspacesUnder Review2022-12-02

Actions
Actions

Also available in: Atom PDF