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

Error message during XML import if format version is wrong is not shown #40

Open
noeol opened this issue Jan 18, 2024 · 0 comments
Open

Comments

@noeol
Copy link

noeol commented Jan 18, 2024

l10nmgr Version: 11.2.0
TYPO3: 11.5.34
PHP Version: 7.4

Error: If the format version of the XML import file does not correspond to the required version, no error message is shown. The user can therefore not recognize what the problem is when trying to import an old XML format version (e.g. 1.2 from l10nmgr v9.2 created under TYPO3 v9.5) .

How to reproduce: Simply change the version from 2.0 to 1.2 in the XML file (see <t3_formatVersion>) and try to import it.

Current state How it should be
Current state How it should be

Suggestion how to fix the issue:

$this->languageService = GeneralUtility::makeInstance(LanguageService::class);

     public function __construct(string $file, int $sysLang, string $xmlString)
     {
         $this->sysLang = $sysLang;
-        $this->languageService = GeneralUtility::makeInstance(LanguageService::class);
+        $this->languageService = $GLOBALS['LANG'] ?? GeneralUtility::makeInstance(LanguageService::class);
         if (!empty($file)) {
             $this->file = $file;
         }
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

1 participant