b13 / container

A TYPO3 Extension for creating custom nested content elements
GNU General Public License v2.0
168 stars 62 forks source link

colSpan not working in the backend view #505

Open patrickklosedev opened 4 months ago

patrickklosedev commented 4 months ago

I have the following configuration in the file tt_content.php:

image

According to an example of this extension, this should lead to having the first row span the two columns that follow. However, this is the result in the backend:

image

Is this a bug or did I used "colSpan" wrongly?

achimfritz commented 4 months ago

TYPO3 12? "Layout-Mode" Screenshot 2024-06-04 at 15 55 51 but "Language-Comparison-Mode" Screenshot 2024-06-04 at 15 56 45

this is same as core backend_layout rendering behaviour.

patrickklosedev commented 4 months ago

Yes, Typo3 V12. And even in Layout Mode, it doesn't work.

When I check the source code, the defined colspan is not used. By changing this value directly in the source code, it works (temporary):

Bildschirmfoto 2024-06-04 um 16 34 03
achimfritz commented 4 months ago

this is my source-code (with EXT:container_example, https://github.com/b13/container-example/blob/master/Configuration/TCA/Overrides/tt_content.php#L11) Screenshot 2024-06-05 at 07 04 49 ah i see ..., you have to write "colspan" instead of "colSpan" in your configuration

patrickklosedev commented 4 months ago

Unfortunately, this doesn't work either... I already have this tried before.

I will try out your code example and get back to you.

MohsinQK commented 4 months ago

Same issue in v12.

h-e-l-l-o-w-o-r-l-d commented 3 months ago

Same problem here with TYPO3 11 and latest EXT:container. PHP 7.4 or 8.2 doesn't matter.

It works in column view, but not in language view.

engelart-development commented 1 week ago

Typo3 12.4.21 PHP 8.2 Container 2.3.6

\TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\B13\Container\Tca\Registry::class)->configureContainer( ( new \B13\Container\Tca\ContainerConfiguration( '2cols-container', // CType '2 Spalten', // label 'Container Element für 2 Spalten', // description [ [ ['name' => 'linke Spalte', 'colPos' => 10], ['name' => 'rechte Spalte', 'colPos' => 20], ], [ ['name' => 'Erweiterung', 'colPos' => 30, 'colspan' => 2] ] ] // grid configuration )

Bildschirmfoto 2024-10-21 um 08 08 01
jk-swe commented 1 week ago

We have examined the problem in detail. The reason why the colspan set in the TCA is not used could be found in sysext/backend/Classes/View/BackendLayout/Grid/GridColumn.php:

    public function getColSpan(): int
    {
        if ($this->context->getDrawingConfiguration()->getLanguageMode()) {
            return 1;
        }
        return $this->colSpan;
    }

In languageView the TCA values are ignored. Crazy...

h-e-l-l-o-w-o-r-l-d commented 6 days ago

Thanks for digging into it. So next step is to open a core issue?