Skip to content

Commit

Permalink
[BUGFIX] Include missing LL file in form flexform
Browse files Browse the repository at this point in the history
In patch #94429 inclusion of LL file has been removed accidentally.
To prevent multiple inclusion of LL-file in loop, incusion is done
in DataStructureIdentifierHook::__construct now.
Adds new constant for LLFile.

Resolves: #90784
Related: #94429
Releases: master
Change-Id: I4446ed6e05b8e506279e77fae4703a817831129d
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/70465
Tested-by: core-ci <typo3@b13.com>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Björn Jacob <bjoern.jacob@tritum.de>
Tested-by: waldhacker <hello@waldhacker.dev>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Björn Jacob <bjoern.jacob@tritum.de>
Reviewed-by: Rudy Gnodde <rudy@famouswolf.com>
Reviewed-by: waldhacker <hello@waldhacker.dev>
  • Loading branch information
andreas-tritum authored and waldhacker1 committed Aug 13, 2021
1 parent 6c12d5a commit 99b134d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Expand Up @@ -44,12 +44,16 @@
*/
class DataStructureIdentifierHook
{

/**
* Localisation prefix
*/
const L10N_PREFIX = 'LLL:EXT:form/Resources/Private/Language/Database.xlf:';

public function __construct()
{
$this->getLanguageService()->includeLLFile('EXT:form/Resources/Private/Language/Database.xlf');
}

/**
* The data structure depends on a current form selection (persistenceIdentifier)
* and if the field "overrideFinishers" is active. Add both to the identifier to
Expand Down
Expand Up @@ -20,6 +20,7 @@
use Prophecy\Argument;
use TYPO3\CMS\Core\Cache\CacheManager;
use TYPO3\CMS\Core\Cache\Frontend\FrontendInterface;
use TYPO3\CMS\Core\Localization\LanguageService;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Form\Hooks\DataStructureIdentifierHook;
use TYPO3\CMS\Form\Mvc\Persistence\FormPersistenceManagerInterface;
Expand Down Expand Up @@ -48,6 +49,8 @@ public function setUp(): void
$cacheProphecy->get(Argument::cetera())->willReturn(false);
$cacheProphecy->set(Argument::cetera())->willReturn(false);
GeneralUtility::setSingletonInstance(CacheManager::class, $cacheManagerProphecy->reveal());
$languageService = $this->prophesize(LanguageService::class);
$GLOBALS['LANG'] = $languageService->reveal();
}

/**
Expand Down

0 comments on commit 99b134d

Please sign in to comment.