Project

General

Profile

Actions

Bug #102991

open

DDEV, Extension Development and Translations not working with TYPO3_PATH_APP set

Added by Marcus Schwemer 3 months ago. Updated 2 months ago.

Status:
Needs Feedback
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2024-01-30
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
12
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

For many of our extensions we use a ddev setup for development purposes. For example https://github.com/in2code-de/publications

TYPO3 and the is completely setup under .build using the env variable TYPO3_PATH_APP set to /var/www/html/.build. The installation works basically fine, including the translations of the core.

But the translation delivered with the extension are not displayed. Always the default language (english) is shown.

Howto reproduce

The is true in the backend, if you add the german language and switch the be user to german ... the english labels are still used.

(If you are asking, why the initial setup is with the german language. It has historical reasons and will be changed some when ... ;-) )

It could be related to https://forge.typo3.org/issues/101334, which sounds quite similar.


Files

Bildschirmfoto vom 2024-01-30 09-17-52.png (38.8 KB) Bildschirmfoto vom 2024-01-30 09-17-52.png Screenshot 1: Translation does not work Marcus Schwemer, 2024-01-30 08:18
Bildschirmfoto vom 2024-01-26 17-40-39.png (57.3 KB) Bildschirmfoto vom 2024-01-26 17-40-39.png Screenshot 2: Translation works Marcus Schwemer, 2024-01-30 08:21

Updated by Marcus Schwemer 3 months ago

If using the environment variable the l10n cache in .build/var/cache/data/l10n does not contain the translation (Screenshot 1).

If the env variable is not set, the cache is under var/cache/ and the l10 cache includes the german translation. (Screenshot 2).

Actions #2

Updated by Stefan Bürk 2 months ago

  • Status changed from New to Needs Feedback

Instead of setting the `TYPO3_PATH_APP` environment variable directly,
have you tried to use following in your extension composer.json to
setup the TYPO3 installation ?

{
    "config": {
        "allow-plugins": {
            "typo3/class-alias-loader": true,
            "typo3/cms-composer-installers": true
        },
        "bin-dir": ".Build/bin",
        "vendor-dir": ".Build/vendor",
    },
    "extra": {
        "typo3/cms": {
            "extension-key": "your_extension_key",
            "web-dir": ".Build/Web" 
        }
    },  
}

That will create a full TYPO3 composer based installation in `.Build/` with `./Build/Web` as "public" folder (document root for ddev for the domain)
and properly bootstrap all path calculations properly ?

At least, this is what we normally use for extensions development (and I'm settupt up my local apache2 on ./Build/Web and never detected an issue.

I'd would stay away of manipulating these environment variables by hand as there are multiple involved and can lead to undesired effects.

Actions #3

Updated by Marcus Schwemer 2 months ago · Edited

Yes, we have the composer setting like you mentioned it.

But then the directories "var" and "config" will not be in the .Build folder, but in the project root. This is the thing, we want to prevent.

Actions

Also available in: Atom PDF