diff --git a/Classes/Configuration/PackageHelper.php b/Classes/Configuration/PackageHelper.php index 4908179..e40860d 100644 --- a/Classes/Configuration/PackageHelper.php +++ b/Classes/Configuration/PackageHelper.php @@ -12,6 +12,7 @@ * of the License, or any later version. */ +use TYPO3\CMS\Core\Configuration\ExtensionConfiguration; use TYPO3\CMS\Core\Exception\SiteNotFoundException; use TYPO3\CMS\Core\Package\Exception\UnknownPackageException; use TYPO3\CMS\Core\Package\PackageInterface; @@ -79,8 +80,8 @@ public function getSiteListForSiteModule(array &$fieldDefinition): void $currentValue = $fieldDefinition['row']['sitePackage'] ?? ''; $gotCurrentValue = false; foreach ($this->packageManager->getActivePackages() as $package) { - $packageKey = $package->getPackageKey(); - if (substr($packageKey, 0, 5) === 'site_') { + if ($package->getPackageMetaData()->getPackageType() === 'typo3-cms-site') { + $packageKey = $package->getPackageKey(); $fieldDefinition['items'][] = [ 0 => $packageKey, 1 => $packageKey, diff --git a/Resources/Private/Language/ext_conf_template.xlf b/Resources/Private/Language/ext_conf_template.xlf new file mode 100644 index 0000000..073090a --- /dev/null +++ b/Resources/Private/Language/ext_conf_template.xlf @@ -0,0 +1,10 @@ + + + + + + Site package prefix + + + + diff --git a/ext_conf_template.txt b/ext_conf_template.txt new file mode 100644 index 0000000..e2943a4 --- /dev/null +++ b/ext_conf_template.txt @@ -0,0 +1,2 @@ +# cat=General; type=string; label=LLL:EXT:bolt/Resources/Private/Language/ext_conf_template.xlf:sitePackagePrefix.label +sitePackagePrefix = site_