Skip to content
Snippets Groups Projects
Commit 33102bd1 authored by Oliver Hader's avatar Oliver Hader Committed by Christian Kuhn
Browse files

[BUGFIX] l10n_state field is not created when installing an extension

l10n_state fields are not created automatically when installing an
extension since there is no slot defined for the according signal
InstallUtility::tablesDefinitionIsBeingBuilt.

Change-Id: Ib4d05d3c3a2dde9b6d0a77f89dee650a3872544d
Resolves: #80271
Releases: master
Reviewed-on: https://review.typo3.org/52080


Tested-by: default avatarTYPO3com <no-reply@typo3.com>
Reviewed-by: default avatarGeorg Ringer <georg.ringer@gmail.com>
Tested-by: default avatarGeorg Ringer <georg.ringer@gmail.com>
Reviewed-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
parent d1f017a8
Branches
Tags
No related merge requests found
......@@ -25,9 +25,40 @@ class DatabaseSchemaService
/**
* Add l10n_state field to tables that provide localization
*
* @param array $sqlString Current SQL statements to be executed
* @return string Localization fields database schema
*/
public function getLocalizationRequiredDatabaseSchema(array $sqlString)
{
$additionalSqlString = $this->buildLocalizationRequiredDatabaseSchema();
if (!empty($additionalSqlString)) {
$sqlString[] = $additionalSqlString;
}
return ['sqlString' => $sqlString];
}
/**
* Add l10n_state field to tables that provide localization
*
* @param array $sqlString Current SQL statements to be executed
* @param string $extensionKey Extension key currently processed
* @return string Localization fields database schema
*/
public function getLocalizationRequiredDatabaseSchemaForExtension(array $sqlString, string $extensionKey)
{
$additionalSqlString = $this->buildLocalizationRequiredDatabaseSchema();
if (!empty($additionalSqlString)) {
$sqlString[] = $additionalSqlString;
}
return ['sqlString' => $sqlString, 'extensionKey' => $extensionKey];
}
/**
* Add l10n_state field to tables that provide localization
*
* @return string Localization fields database schema
*/
protected function buildLocalizationRequiredDatabaseSchema()
{
$tableSchemas = [];
......@@ -50,10 +81,6 @@ class DatabaseSchemaService
);
}
if (!empty($tableSchemas)) {
$sqlString[] = implode(LF, $tableSchemas);
}
return ['sqlString' => $sqlString];
return implode(LF, $tableSchemas);
}
}
......@@ -76,6 +76,13 @@ $signalSlotDispatcher->connect(
'getLocalizationRequiredDatabaseSchema'
);
$signalSlotDispatcher->connect(
\TYPO3\CMS\Extensionmanager\Utility\InstallUtility::class,
'tablesDefinitionIsBeingBuilt',
\TYPO3\CMS\Core\DataHandling\DatabaseSchemaService::class,
'getLocalizationRequiredDatabaseSchemaForExtension'
);
unset($signalSlotDispatcher);
$GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['dumpFile'] = \TYPO3\CMS\Core\Controller\FileDumpController::class . '::dumpAction';
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment