Project

General

Profile

Actions

Bug #59192

closed

Task #79241: Streamline usage of l10n_mode

mergeIfNotBlank with FAL records

Added by Lorenz Ulrich almost 10 years ago. Updated about 7 years ago.

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

0%

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

Description

mergeIfNotBlank doesn't seem to play with FAL records. I'm using EXT:news with FAL relations enabled (default as of 3.0). There are two FAL fields:

- Media file (fal_media)
- Related files (fal_related_files)

Both are using ExtensionManagementUtility::getFileFieldTCAConfig for their file field.

The TCA reference states the following: "Field will be editable but if the field value is blank the value from the default translation is used (this can be very useful for images shared from the default record). Requires frontend support. In the backend the effect is that the field content is not copied when a new "localization copy" is made."

From my understanding, applied to a FAL field this means the following when I localize an item:

Scenario A: I just want to use the files from the original version

Expectation:

The sys_file_references are not copied. I see an information about the items that are going to be used if I don't set any new relations:

When I view the localized news, the files from the original version are visible.

Current behaviour, sys_language_mode=strict:

  • I don't see any information about the files being used if I don't set any new relations.
  • I have no files in the frontend output at all.

Current behaviour, sys_language_mode=content_fallback:

  • I don't see any information about the files being used if I don't set any new relations.
  • I can see the file references.

Scenario B: I want to use own files for the localized version

Expectation:

I add own files. Since the fields are no longer blank in the localized version, only the localized files I added will be displayed.

Current behaviour, sys_language_mode=strict:

No files are displayed at all.

Current behaviour, sys_language_mode=content_fallback:

The files from the default language are displayed, the files from the localized version are ignored.

Possible workaround

The only way I can add files at all in a translated item is to change the TCA definition of the field to display the localization buttons:

    $TCA['tx_news_domain_model_news']['columns']['fal_related_files'] = array(
        'exclude' => 1,
        'l10n_mode' => 'mergeIfNotBlank',
        'label' => '' . $ll . 'tx_news_domain_model_news.fal_related_files',
        'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig(
            'related_files',
            array(
                'appearance' => array(
                    'showAllLocalizationLink' => 1,
                    'showSynchronizationLink' => 1,
                )
            )
        )
    );

Then I see the files from the original language.

sys_language_mode=strict: They are still not displayed in the frontend as it would be expected for "mergeIfNotBlank" fields.

Once I localize the references, the files are displayed. But the meta information is always taken from the default language and cannot be overridden:

Relations that only exist in the localized version are still not displayed at all (both language modes).

I don't know if these are mostly Extbase or non-Extbase issues.


Files

mergeifnotblank-information.png (7.76 KB) mergeifnotblank-information.png Lorenz Ulrich, 2014-05-28 22:55
fal-localized-buttons.png (12.9 KB) fal-localized-buttons.png Lorenz Ulrich, 2014-05-28 22:55
fal-override-notworking.png (25.2 KB) fal-override-notworking.png Lorenz Ulrich, 2014-05-28 22:55

Related issues 4 (0 open4 closed)

Related to TYPO3 Core - Bug #57272: Extbase doesn't handle FAL translations correctlyClosed2014-03-25

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

Actions
Related to TYPO3 Core - Bug #62155: IRRE at localized records not working properly with Extbase/Fluid Rejected2014-10-10

Actions
Related to TYPO3 Core - Bug #59972: Invalid mergeIfNotBlank usage in sys_file_reference TCAClosed2014-06-29

Actions
Actions

Also available in: Atom PDF