Bug #93889
Updated by Xavier Perseguers over 3 years ago
Since the move to PSR-14 one cannot modify the language pack remote base URL. This is following event: <pre> TYPO3\CMS\Install\Service\Event\ModifyLanguagePackRemoteBaseUrlEvent </pre> The reason is that the listener provider @TYPO3\CMS\Core\EventDispatcher\ListenerProvider@ has an empty list of initialized listeners (member @listeners@), most probably in relation with the context (Install Tool). h2. Configuration In @EXT:yourExt/Configuration/Settings.yaml@: <pre> VENDOR\YourExt\EventListener\InstallServiceEventListener: tags: - name: event.listener identifier: 'VENDOR/yourExt' method: 'modifyLanguagePackRemoteBaseUrl' event: TYPO3\CMS\Install\Service\Event\ModifyLanguagePackRemoteBaseUrlEvent </pre> Sample class @VENDOR\YourExt\EventListener\InstallServiceEventListener@: <pre> namespace VENDOR\YourExt\EventListener; use TYPO3\CMS\Core\Http\Uri; use TYPO3\CMS\Install\Service\Event\ModifyLanguagePackRemoteBaseUrlEvent; class InstallServiceEventListener { /** * @param ModifyLanguagePackRemoteBaseUrlEvent $event */ public function modifyLanguagePackRemoteBaseUrl(ModifyLanguagePackRemoteBaseUrlEvent $event): void { if ($event->getPackageKey() === 'yourExt') { $event->setBaseUrl(new Uri('https://www.example.com/packages/')); $event->setBaseUrl('https://www.example.com/packages/'); } } } </pre> h2. Expected The method is invoked. h2. What happens The method is not invoked as no listeners seems to be registered in that context.