Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

colSpan not working in the backend view #505

Open
patrickklosedev opened this issue Jun 4, 2024 · 9 comments
Open

colSpan not working in the backend view #505

patrickklosedev opened this issue Jun 4, 2024 · 9 comments

Comments

@patrickklosedev
Copy link

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
Copy link
Contributor

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
Copy link
Author

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
Copy link
Contributor

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
Copy link
Author

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
Copy link

Same issue in v12.

@h-e-l-l-o-w-o-r-l-d
Copy link

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
Copy link

engelart-development commented Oct 21, 2024

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
Copy link

jk-swe commented Oct 24, 2024

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
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants