Bug #48883

Wrong sys_language_uid in sys_file_reference

Added by Heiko Kromm about 2 years ago. Updated 10 months ago.

Status:New Start date:2013-06-05
Priority:Should have Due date:
Assigned To:- % Done:

0%

Category:File Abstraction Layer (FAL) Spent time: -
Target version:-
TYPO3 Version:6.1 Is Regression:No
PHP Version:5.4 Sprint Focus:
Complexity:

Description

I have a domain model, which has a property image, which is a FAL image.
When I create a new element in default language and add a FAL image to this element everything works fine.
If I localize the element the FAL ImageResource will be localized too.

But if I create a new element in non-default language (sys_language_uid = 1) the attached FAL image is not recognized by extbase.
I checked the sys_file_reference table and the entry for the attached FAL image has a sys_language_uid=0. Therefore extbase does not recognize the FAL image. If I change sys_language_uid to 1, which is the sys_language_uid of the parent object ist works.

I think when creating new inline FAL images, the system needs to respect the sys_language_uid of the parent Object.


Related issues

related to Core - Bug #57063: Parent language is not applied to new child records Resolved 2014-03-19
related to Core - Bug #57272: Extbase doesn't handle FAL translations correctly Under Review 2014-03-25
blocked by Core - Bug #21964: New child records created from a translated record have d... Closed 2010-01-15

History

#1 Updated by Tim Lochmüller about 2 years ago

I can confirm this issue. But I think it is more an IRRE Bug than a FAL related issue?!

#2 Updated by Aske Ertmann almost 2 years ago

Looking a little into this issue I think the reason why it doesn't work in Extbase is because the FAL API doesn't use proper TYPO3 API to get file references. I looks like it would work fine if you use the TypoScript objects to fetch your references because the ContentObjectRenderer's getImgResource uses FAL's ResourceFactory to fetch the file reference. The method getFileReferenceObject in the ResourceFactory uses the page repository's checkRecord method, which does not check language and therefore bypassing the language field. However Extbase uses the it's own SQL parser which follows all the rules defined in the sys_file_reference's ctrl configuration, and therefore adds the language check.

http://api.typo3.org/typo3cms/master/html/_resource_factory_8php_source.html#l00440

So IMO it's related to FAL since FAL bypasses the ctrl configuration, but there are of course more than one solution, either one specifically for Extbase and one for handling languages for sys_file_references property. Thing is though that the references are copied when an element is translated instead of it using the normal inline translation workflow, so maybe it doesn't even make sense to have localized versions of sys_file_references.

#3 Updated by Frans Saris over 1 year ago

  • Is Regression set to No

IMO it is a problem in IRRE as the FAL layer isn't touched when you create a new relation in BE.

#4 Updated by Viktor Livakivskyi over 1 year ago

Added a dependency to an IRRE issue #21964, which is... 4 years old.

#5 Updated by Jan Greth over 1 year ago

I have the exact same behaviour and brings much trouble in multilingual sites...
Does anyone have a clue how to workaround this?

#6 Updated by Helmut Hummel about 1 year ago

  • Status changed from New to Needs Feedback

Can you please check if this issue is fixed for you with the fix applied to #57063

#7 Updated by Patrick Kroog 12 months ago

I can confirm that this issue still exists in 6.2.3 (unfortunately can't try out 6.2.4 atm)

1) Create new Parent Record (set sys_language_uid > 0)
2) Create Image-IRRE-Relation (sys_file_reference) -> sys_language_uid field is in hidden palette "filePalette" and of course defaults to value "0" (if no other default value is set)

3) Result: Parent Record has sys_language_uid > 0.. Child Record in sys_file_reference has the value "0" as you can't change it by default...

The problem also still seems to exist for already existing parent records.

@Jan Greth:
For now, one option is to make the palette visible via extTables.php, and then at least be able to configure the sys_language_uid field manually:

$TCA['sys_file_reference']['palettes']['filePalette']['isHiddenPalette'] = 0;

#8 Updated by Alexander Opitz 10 months ago

  • Status changed from Needs Feedback to New

Also available in: Atom PDF