Project

General

Profile

Actions

Bug #94672

open

Handling of Group's "Custom Value" in translated pages when "behaviour" -> "allowLanguageSynchronization" is true

Added by Samuel Giss over 2 years ago.

Status:
New
Priority:
Should have
Category:
Extbase + l10n
Target version:
-
Start date:
2021-07-30
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
9
PHP Version:
7.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

Situation:

  • Input of type "group" (related_pages) for selection of related pages in page properties (see below for config)
  • Site with multiple languages

What I did:

  1. Create page with default language (uid 0)
  2. Select 2 pages in group input
  3. Translate page to language with uid 1
  4. Select "Custom Value" for synchronised group input
  5. Select a single page in group input for translated page

The problem:
I receive the selected pages from the default language on the translated page

TCA Config:

'related_pages' => [
        'label' => 'LLL:EXT:stv/Resources/Private/Language/Backend.xlf:pages.columns.related_articles',
        'config' => [
            'type' => 'group',
            'internal_type' => 'db',
            'allowed' => 'pages',
            'foreign_table' => 'pages',
            'foreign_table_where' => ' pages.pid = 2311 AND pages.doktype = 100 AND pages.uid != ###THIS_UID###',
            'MM_opposite_field' => 'related_from',
            'size' => 5,
            'minitems' => 0,
            'maxitems' => 3,
            'MM' => 'tx_stv_articles_related_mm',
            'suggestOptions' => [
                'default' => [
                    'suggestOptions' => true,
                    'addWhere' => ' AND pages.pid = 2311 AND pages.doktype = 100 AND pages.uid != ###THIS_UID###'
                ]
            ],
            'behaviour' => [
                'allowLanguageSynchronization' => true,
            ],
        ]
    ],
'related_from' => [
        'exclude' => true,
        'label' => 'LLL:EXT:stv/Resources/Private/Language/Backend.xlf:pages.columns.related_from',
        'config' => [
            'type' => 'group',
            'internal_type' => 'db',
            'foreign_table' => 'pages',
            'allowed' => 'pages',
            'size' => 5,
            'MM' => 'tx_stv_articles_related_mm',
            'readOnly' => 1,
        ]
    ]

SQL for "pages":

    related_pages       int(11) DEFAULT '0' NOT NULL,
    related_from        int(11) DEFAULT '0' NOT NULL

SQL for MM-table:

CREATE TABLE tx_stv_articles_related_mm
(
    uid_local           int(11) DEFAULT '0' NOT NULL,
    uid_foreign         int(11) DEFAULT '0' NOT NULL,
    sorting             int(11) DEFAULT '0' NOT NULL,
    sorting_foreign     int(11) DEFAULT '0' NOT NULL,

    KEY uid_local (uid_local),
    KEY uid_foreign (uid_foreign)
);

No data to display

Actions

Also available in: Atom PDF