Issue Bug Closed

#106547$config Parameter passed to ItemsProcFunc does not contain a concrete Site when editing a page-translation

Philipp Wrann 04/10/25, 12:54 updated 04/16/25, 07:27

Description

In translations the “site” field of the $config parameter contains a NullSite.

I don’t know, if this has been fixed in V13/V14 but it is valid for V12. Also i don’t know, if this affects other record types as well.

I wouldn’t target the patchlevel if it was true for all languages but having different parameters depending on the language seems very odd.

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.

Files 1

History 2

  1. Philipp Wrann commented 04/10/25, 13:06

    If you are dealing with a flex-field, you can workaround this by adding something like this (this can easily be adopted and applied for non-flex context):

    if ($config['site'] instanceof Site) {
        $site = $config['site'];
    } elseif ($config['table'] === 'pages' && !empty($config['flexParentDatabaseRow']['l10n_parent'])) {
        // @see https://forge.typo3.org/issues/106547
        $site = $this->siteFinder->getSiteByPageId((int) $config['flexParentDatabaseRow']['l10n_parent']);
    } else {
        $site = null;
    }

    Of course you would have to inject the SiteFinder into your class

  2. Georg Ringer commented and changed attached Bildschirmfoto 2025-04-16 um 09.25.29.png status New Closed 04/16/25, 07:27

    Hey Philipp,

    thanks for reporting this issue. I just checked and this works fine in v14/v13, see screenshot attached
    Bildschirmfoto%202025-04-16%20um%2009.25.29.png

    As v12 is in priority bugfix mode, we won’t fix it there anymore and I am closing the issue