diff --git a/Classes/Update/NewGeocodeUriForOsmUpdate.php b/Classes/Update/NewGeocodeUriForOsmUpdate.php index 82e04b2d..ffb4d7e5 100644 --- a/Classes/Update/NewGeocodeUriForOsmUpdate.php +++ b/Classes/Update/NewGeocodeUriForOsmUpdate.php @@ -14,6 +14,7 @@ use TYPO3\CMS\Core\Configuration\Exception\ExtensionConfigurationExtensionNotConfiguredException; use TYPO3\CMS\Core\Configuration\Exception\ExtensionConfigurationPathDoesNotExistException; use TYPO3\CMS\Core\Configuration\ExtensionConfiguration; +use TYPO3\CMS\Core\Information\Typo3Version; use TYPO3\CMS\Core\Utility\GeneralUtility; use TYPO3\CMS\Install\Updates\UpgradeWizardInterface; @@ -57,9 +58,20 @@ public function executeUpdate(): bool is_array($maps2ExtensionConfiguration) && array_key_exists('openStreetMapGeocodeUri', $maps2ExtensionConfiguration) ) { - $maps2ExtensionConfiguration['openStreetMapGeocodeUri'] = $this->newOsmGeocodeUri; + if (version_compare($this->getTypo3Version()->getBranch(), '11.0', '>=')) { + $maps2ExtensionConfiguration['openStreetMapGeocodeUri'] = $this->newOsmGeocodeUri; + $this->getExtensionConfiguration()->set( + 'maps2', + $maps2ExtensionConfiguration + ); + } else { + $this->getExtensionConfiguration()->set( + 'maps2', + 'openStreetMapGeocodeUri', + $this->newOsmGeocodeUri + ); + } } - $this->getExtensionConfiguration()->set('maps2', $maps2ExtensionConfiguration); return true; } catch (ExtensionConfigurationExtensionNotConfiguredException | ExtensionConfigurationPathDoesNotExistException $e) { @@ -83,6 +95,11 @@ private function getExtensionConfiguration(): ExtensionConfiguration return GeneralUtility::makeInstance(ExtensionConfiguration::class); } + private function getTypo3Version(): Typo3Version + { + return GeneralUtility::makeInstance(Typo3Version::class); + } + public function getPrerequisites(): array { return []; diff --git a/Documentation/ChangeLog/Index.rst b/Documentation/ChangeLog/Index.rst index e1ba4e89..b2ae9d6d 100644 --- a/Documentation/ChangeLog/Index.rst +++ b/Documentation/ChangeLog/Index.rst @@ -7,6 +7,11 @@ ChangeLog ========= +Version 10.0.10 +=============== + +* BUGFIX: Repair OSM UpgradeWizard for TYPO3 10 + Version 10.0.9 ============== diff --git a/Documentation/Settings.cfg b/Documentation/Settings.cfg index fb4130fa..6797c079 100644 --- a/Documentation/Settings.cfg +++ b/Documentation/Settings.cfg @@ -22,7 +22,7 @@ project = maps2 (Maps2) version = 10.0 -release = 10.0.9 +release = 10.0.10 t3author = Stefan Froemken copyright = since 2013 by jweiland.net diff --git a/ext_emconf.php b/ext_emconf.php index a487a0b7..c42b2774 100644 --- a/ext_emconf.php +++ b/ext_emconf.php @@ -3,7 +3,7 @@ $EM_CONF[$_EXTKEY] = [ 'title' => 'Maps2', 'description' => 'Create maps with Marker, Area, Routes or Radius based on Google Maps or OpenStreetMap', - 'version' => '10.0.9', + 'version' => '10.0.10', 'category' => 'plugin', 'state' => 'stable', 'clearCacheOnLoad' => true,