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

Content-Elements with sys_language_uid === -1 are only shown in the language they're in #478

Open
BeerOnTheBeach opened this issue Feb 19, 2024 · 2 comments

Comments

@BeerOnTheBeach
Copy link

Description
Content-Elements inside b13-containers are not shown in other languages if the language is set to "all languages".

How to reproduce
Could reproduce it in a fresh TYPO3 v11.5.35 installation with only the b13/container (2.3.5) and the b13/container-example (2.0.0) installed.

  1. Add another language
  2. Create a container, add Content-Element
  3. Set both to language "All languages"

image

Solution approach

Not sure if I'm on the correct path here, but I've noticed that the container/Classes/Domain/Factory/PageView/Frontend/ContainerFactory.php:95 is only checking if the language is > 0. Checking if the record-language is -1 would fix this. Testing this seemed to not break anything, but I'm not 100% sure tbh.

This would be the diff:

--- public/typo3conf/ext/container/Classes/Domain/Factory/PageView/Frontend/ContainerFactory.php
+++ public/typo3conf/ext/container/Classes/Domain/Factory/PageView/Frontend/ContainerFactory.php
@@ -92,7 +92,7 @@
         }

         $defaultRecord = null;
-        if ($record['sys_language_uid'] > 0) {
+        if ($record['sys_language_uid'] > 0 || $record['sys_language_uid'] === -1) {
             $defaultRecord = $this->defaultContainer($record);
             if ($defaultRecord === null) {
                 // free mode
@chesio
Copy link

chesio commented Feb 19, 2024

Hi @BeerOnTheBeach, this is not supported - see #237.

@BeerOnTheBeach
Copy link
Author

hi @chesio,

thanks for the hint. Seems this is never gonna happen then, huh?

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

2 participants