Project

General

Profile

Actions

Bug #90373

closed

Persisting FileReference in Extbase leads to empty 'table_local' field in sys_file_reference

Added by This Mächler about 4 years ago. Updated 11 months ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
File Abstraction Layer (FAL)
Target version:
-
Start date:
2020-02-15
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
9
PHP Version:
7.2
Tags:
FAL Extbase FileReference Persistence Persisting
Complexity:
easy
Is Regression:
Sprint Focus:

Description

Persisting a new TYPO3\CMS\Extbase\Domain\Model\FileReference in an Extbase Model does not set the value 'sys_file' in the sys_file_reference record.

In the backend this has the effect that the reference is not recognized as file. An editor does not see the original image for example when opening the info-view to the reference. When the field 'table_local' is empty, the info-view shows a 'file reference' and does not show the original image and information to it, it only shows information about the reference itself. When the field 'table_local' contains the value 'sys_file' as it should, the editor sees information to the orignial file.

I don't know how the model is handled internally when persisting, as there is no field uidForeign in the model (and also not in one of it's ancestor classes), and also no field tableLocal, i guess some magic is done do it on persisting.

However, the field 'table_local' must contain a value after persisting.


Files


Related issues 1 (1 open0 closed)

Related to TYPO3 Core - Feature #90374: Add setOriginaFile / setFile setter to TYPO3\CMS\Extbase\Domain\Model\FileReferenceUnder Review2020-02-15

Actions
Actions #1

Updated by Christian Eßl about 4 years ago

  • Related to Feature #90374: Add setOriginaFile / setFile setter to TYPO3\CMS\Extbase\Domain\Model\FileReference added
Actions #2

Updated by André Buchmann over 3 years ago

This issue is also caused if the default value for the field table_local is somehow missing in the TCA.

Here you can see the difference between the correct entry (first image) and the entry with empty table_local field (second image)

Actions #3

Updated by Stefan Froemken 11 months ago

Hello and thank you for that info.

I have just tested that issue on TYPO3 12 again without any problems.
With TYPO3 12.0 we have remove the usage of table_local completely.
As you see in my uploaded image here, all data of sys_file will be shown in FileInfo PopUp now.

I will close the ticket now. If you feel this is the wrong decision, let me know, and I will re-open it.

Stefan

Actions

Also available in: Atom PDF