Bug #57488

page record overlays: media field not translatable

Added by Alexander Dick over 7 years ago. Updated about 3 years ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
File Abstraction Layer (FAL)
Target version:
-
Start date:
2014-04-01
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
5.3
Tags:
Complexity:
medium
Is Regression:
No
Sprint Focus:

Description

Reproduce:

1) add some images to the media field of a page
2) translate the page
3) no localizable images from the original record show up!


Files

media_615.jpg (6.84 KB) media_615.jpg View of the localized page in 6.1.5 Thomas Fersterer, 2014-04-10 13:25
media_62_de.jpg (17.5 KB) media_62_de.jpg Resources in 6.2 (default language) Thomas Fersterer, 2014-04-10 13:25
media_62_en.jpg (16.3 KB) media_62_en.jpg Resources in 6.2 (localized version) Thomas Fersterer, 2014-04-10 13:25
forge_57488.png (19.3 KB) forge_57488.png Oliver Hader, 2014-04-28 18:04
page_record_overlay_editmode.png (22.1 KB) page_record_overlay_editmode.png Alexander Dick, 2014-04-28 19:13
forge_57488_wip.png (46.3 KB) forge_57488_wip.png Oliver Hader, 2014-04-28 22:46

Related issues

Related to TYPO3 Core - Bug #52816: Make sys_file_metadata and sys_file_references table translatableClosedSteffen Ritter2013-10-14

Actions
Related to TYPO3 Core - Bug #58352: Invalid localization overlay of cObject FILESClosedOliver Hader2014-04-30

Actions
Related to TYPO3 Core - Task #58476: Enhance localization behavior of pages.mediaClosedOliver Hader2014-05-04

Actions
Related to TYPO3 Core - Bug #60370: Irre elements with enabled useCombination missing new record buttonClosed2014-07-17

Actions
#1

Updated by Stefan Neufeind over 7 years ago

Can you maybe say if it worked in 6.0/6.1 or so?

#2

Updated by Thomas Fersterer over 7 years ago

I can reproduce it in 6.2, in 6.1.5 it works fine.

#3

Updated by Alexander Dick over 7 years ago

Any news on this?

#4

Updated by Oliver Hader over 7 years ago

  • Category changed from Localization to File Abstraction Layer (FAL)
  • Status changed from New to Accepted
  • Priority changed from Must have to Should have

I can confirm this misbehaviour...

#5

Updated by Oliver Hader over 7 years ago

  • Complexity set to medium

I guess you're using the Page Module's "make new translation of this page", right? (see screenshot forge_57488.png)
The problem here is, that only the dokType and sys_language_uid is forwared to the edit form...

#7

Updated by Alexander Dick over 7 years ago

Exactly! I am using "make new translation of this page". When I'm editing an existing translation it looks like on the attached screenshot.

#8

Updated by Oliver Hader over 7 years ago

  • Assignee set to Oliver Hader

Alright, I'm investigating... I could narrow down the issue to DataPreprocessor, will check further...
The "media" field is empty if delivered from DataPreprocessor in the localization "context"...

#9

Updated by Oliver Hader over 7 years ago

Oliver Hader wrote:

Alright, I'm investigating... I could narrow down the issue to DataPreprocessor, will check further...
The "media" field is empty if delivered from DataPreprocessor in the localization "context"...

Ok, easier than that... the configuration in #52816 just was set from TRUE to FALSE
'showPossibleLocalizationRecords' => FALSE,
'showRemovedLocalizationRecords' => FALSE,
'showSynchronizationLink' => FALSE,

#10

Updated by Gerrit Code Review over 7 years ago

  • Status changed from Accepted to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/29719

#11

Updated by Oliver Hader over 7 years ago

I just could come up with a work-in-progress solution (maybe it turns out to be fine in the end).

Thus, the IRRE localization behaviour has been re-added for pages_language_overlay.media field.
If the record is new in the edit view, the "localize all records" is not shown since the new overlay record does not have a proper uid value, yet.
This is the major difference if compared to the bahaviour with tt_content elements - those are copied/localized directly and thus the file reference can be copied along as well ("localizeChildrenAtParentLocalization" in the TCA behaviour section).

Please test the linked patch from review.typo3.org (even it is work-in-progress) and gimme some feedback. Thanks!

#12

Updated by Oliver Hader over 7 years ago

  • File forge_57488_wip.png added
#13

Updated by Oliver Hader over 7 years ago

  • File deleted (forge_57488_wip.png)
#15

Updated by Alexander Dick over 7 years ago

Thanks Oliver, the patch works! :)

#16

Updated by Gerrit Code Review over 7 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/29719

#17

Updated by Gerrit Code Review over 7 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/29719

#18

Updated by Alexander Dick over 7 years ago

Is there a language overlay/fallback for those fields?

config.sys_language_mode = content_fallback; 1,0
config.sys_language_overlay = 1

With these settings I would expect the records of the default language to show up when they are not translated in the current language. Currently no records show up.
As soon as I localize them, they show up.

#19

Updated by Oliver Hader over 7 years ago

Thanks for testing and your feedback on this. That's a good catch!

If a localized page is used, the reference pointer used "pages_language_overlay" to lookup accordant references in table "sys_file_references", see
https://git.typo3.org/Packages/TYPO3.CMS.git/blob/HEAD:/typo3/sysext/frontend/Classes/ContentObject/FilesContentObject.php#l94

The behaviour is partly correct, but should be:
  • fetch references for pages_language_overlay for the "_LOCALIZED_UID" value
  • if there are no references in the overlay, fallback to references pointing pages and the "uid" value

Since this is still hardcoded, a similar method like in PageRepository::shouldFieldBeOverlaid() is required for this case (e.g. "l10n_mode" = "exclude" or "mergeIfNotBlank").
There are some more things to be done concerning overlays and fallbacks, thus I'd opt to create a separate FAL issue here.

#20

Updated by Gerrit Code Review over 7 years ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/29719

#21

Updated by Oliver Hader over 7 years ago

The overlay behavior part can be found in a separate issue #58352
Thus, if you'd like to test the backend behavior and frontend output you should cherry-pick those two patches.

#22

Updated by Oliver Hader over 7 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
#23

Updated by Herbert Sojnik over 6 years ago

Is this feature not included in TYPO3 6.2.14?
I checked the code of typo3/sysext/frontend/Configuration/TCA/pages_language_overlay.php and here are the modifications beginning in line 158 missing.
Thanks for info.

#24

Updated by Markus Timtner about 6 years ago

I can confirm this - the changes in pages_lanmgauge_overlay.php are at least missing in the source for 6.2.10, too.

#25

Updated by Julian Stock over 5 years ago

Any news on this? It's still not in 6.2.26 :(

#26

Updated by Fronzes Philippe almost 5 years ago

Hi,
Still got this problem on a 7.6.11.

#27

Updated by Oliver Hader over 4 years ago

There was a follow-up issue in #58476

#28

Updated by Benni Mack about 3 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF