nhovratov/content-blocks

Page Type registration breaks language pallete

ondrejgrosko opened this issue · 1 comments

Hello, we've noticed the following issue:
When the custom page type is registered via Content Blocks $GLOBALS['TCA']['pages']['palettes']['language'] breaks. Instead of l18n_cfg there is sys_language_uid,l10n_parent.

  • This is how it should looks for Page in default language
    Screenshot 2024-06-27 at 12 49 53

The result is:

  • missing Language tab in Page properties for default language
    Screenshot 2024-06-27 at 12 51 33

  • broken Language tab for localized page
    Screenshot 2024-06-27 at 12 50 39

I would say the problem lies somewhere in this method. I think buildSystemPalettes shouldn't be called for already existing tables

As a quick fix I've changed this line of code to:

    if ($this->simpleTcaSchemaFactory->has($tableDefinition->getTable()) && $tableDefinition->getTable() !== 'pages') {

But I think there should be more generic fix for it

Tested on
Typo3: 12.4.16
Content Blocks: 0.7.14 (on version 0.6 it works fine)

I would say the problem lies somewhere in this method. I think buildSystemPalettes shouldn't be called for already existing tables

I think this is a regression I introduced by allowing to recreate system palettes, even if the table already exists. This is however needed in certain cases, so I'm fine with adding the table "pages" exclusion. All other tables follow the same structure.