From 58ba40bd7073125001db815ba33bf428d767f85e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Marsza=C5=82?= Date: Mon, 10 Jun 2024 15:14:31 +0200 Subject: [PATCH 01/10] fix: remove RegisterPortalTheme introduction --- manifest.php | 1 - migrations/Version202406060802293772_taoLti.php | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/manifest.php b/manifest.php index cb1145e9..d304c6c9 100755 --- a/manifest.php +++ b/manifest.php @@ -67,7 +67,6 @@ MapLtiSectionVisibility::class, GenerisSearchWhitelist::class, CreateLti1p3RegistrationSnapshotSchema::class, - RegisterPortalTheme::class ] ], 'update' => Updater::class, diff --git a/migrations/Version202406060802293772_taoLti.php b/migrations/Version202406060802293772_taoLti.php index 8666a5dc..3c53073b 100644 --- a/migrations/Version202406060802293772_taoLti.php +++ b/migrations/Version202406060802293772_taoLti.php @@ -23,7 +23,7 @@ public function getDescription(): string public function up(Schema $schema): void { - $this->runAction(new RegisterPortalTheme()); + // Action removed due to conflicting with multiple instance implementations. } public function down(Schema $schema): void From 00471a4df8c2d86b6c27ddc77a705ea16056086a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Marsza=C5=82?= Date: Mon, 10 Jun 2024 16:21:10 +0200 Subject: [PATCH 02/10] fix: revert changes introdcued on instances with taoStyles installed --- .../Version202406101417393772_taoLti.php | 33 ++++++++++++++ scripts/install/UnregisterLtiPortalTheme.php | 45 +++++++++++++++++++ 2 files changed, 78 insertions(+) create mode 100644 migrations/Version202406101417393772_taoLti.php create mode 100644 scripts/install/UnregisterLtiPortalTheme.php diff --git a/migrations/Version202406101417393772_taoLti.php b/migrations/Version202406101417393772_taoLti.php new file mode 100644 index 00000000..bb8b06fc --- /dev/null +++ b/migrations/Version202406101417393772_taoLti.php @@ -0,0 +1,33 @@ +runAction(new RegisterPortalTheme()); + } + + public function down(Schema $schema): void + { + $this->throwIrreversibleMigrationException(); + } +} diff --git a/scripts/install/UnregisterLtiPortalTheme.php b/scripts/install/UnregisterLtiPortalTheme.php new file mode 100644 index 00000000..32b3d6a5 --- /dev/null +++ b/scripts/install/UnregisterLtiPortalTheme.php @@ -0,0 +1,45 @@ +getServiceManager()->get(ThemeServiceInterface::SERVICE_ID); + $oldConfig = $service->getOptions(); + /** @var common_ext_ExtensionsManager $extManager */ + $extManager = $this->getServiceManager()->get(common_ext_ExtensionsManager::class); + if ($extManager->isInstalled('taoStyles')) { + $revertedService = $this->propagate(new PersistenceThemeService($oldConfig)); + $this->getServiceManager()->register(ThemeServiceInterface::SERVICE_ID, $revertedService); + } + } +} From 83ff87de65c40745eb260281a8a7458fb1b1e954 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Marsza=C5=82?= Date: Mon, 10 Jun 2024 16:24:54 +0200 Subject: [PATCH 03/10] fix: Unregister --- migrations/Version202406101417393772_taoLti.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/migrations/Version202406101417393772_taoLti.php b/migrations/Version202406101417393772_taoLti.php index bb8b06fc..e5f5d032 100644 --- a/migrations/Version202406101417393772_taoLti.php +++ b/migrations/Version202406101417393772_taoLti.php @@ -7,6 +7,7 @@ use Doctrine\DBAL\Schema\Schema; use oat\tao\scripts\tools\migrations\AbstractMigration; use oat\taoLti\scripts\install\RegisterPortalTheme; +use oat\taoLti\scripts\install\UnregisterLtiPortalTheme; /** * Auto-generated Migration: Please modify to your needs! @@ -23,7 +24,7 @@ public function getDescription(): string public function up(Schema $schema): void { - $this->runAction(new RegisterPortalTheme()); + $this->runAction(new UnregisterLtiPortalTheme()); } public function down(Schema $schema): void From c03feec343badf8032eaa361a259ba0c75b0226e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Marsza=C5=82?= Date: Tue, 11 Jun 2024 07:34:23 +0200 Subject: [PATCH 04/10] fix: Unregister portal theme service and clear unused configs --- scripts/install/UnregisterLtiPortalTheme.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/scripts/install/UnregisterLtiPortalTheme.php b/scripts/install/UnregisterLtiPortalTheme.php index 32b3d6a5..6d7287a3 100644 --- a/scripts/install/UnregisterLtiPortalTheme.php +++ b/scripts/install/UnregisterLtiPortalTheme.php @@ -24,6 +24,8 @@ use common_ext_ExtensionsManager; use oat\oatbox\service\ConfigurableService; +use oat\tao\model\theme\DefaultTheme; +use oat\tao\model\theme\PortalTheme; use oat\tao\model\theme\ThemeServiceInterface; use oat\taoDelivery\scripts\install\installDeliveryFields; use oat\taoStyles\model\service\PersistenceThemeService; @@ -38,8 +40,19 @@ public function __invoke($params = []) /** @var common_ext_ExtensionsManager $extManager */ $extManager = $this->getServiceManager()->get(common_ext_ExtensionsManager::class); if ($extManager->isInstalled('taoStyles')) { + unset($oldConfig['available']); $revertedService = $this->propagate(new PersistenceThemeService($oldConfig)); $this->getServiceManager()->register(ThemeServiceInterface::SERVICE_ID, $revertedService); + $revertedService->addTheme(new PortalTheme(), false); + $revertedService->addTheme(new DefaultTheme(), false); + return; } + + //Make sure current theme is set + if (!isset($oldConfig['current'])) { + $oldConfig['current'] = 'default'; + } + + $service->setOptions($oldConfig); } } From e1d1c21da1a0f5d24da0585e7fe53b31df6cb90b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Marsza=C5=82?= Date: Tue, 11 Jun 2024 08:24:25 +0200 Subject: [PATCH 05/10] fix: Provide current theme in Authoring controller. Create PortalThemeDetailProvider. Add `themeDetailsProviders` with PortalThemeDetailProvider --- controller/AuthoringTool.php | 7 +++ .../theme/PortalThemeDetailProvider.php | 58 +++++++++++++++++++ scripts/install/UnregisterLtiPortalTheme.php | 5 ++ 3 files changed, 70 insertions(+) create mode 100644 models/classes/theme/PortalThemeDetailProvider.php diff --git a/controller/AuthoringTool.php b/controller/AuthoringTool.php index 4b75f955..e0b7f3b2 100644 --- a/controller/AuthoringTool.php +++ b/controller/AuthoringTool.php @@ -28,6 +28,7 @@ use helpers_Random; use InterruptedActionException; use OAT\Library\Lti1p3Core\Message\Payload\LtiMessagePayloadInterface; +use oat\tao\model\theme\ThemeService; use oat\taoLti\models\classes\LtiException; use oat\taoLti\models\classes\LtiMessages\LtiErrorMessage; use oat\taoLti\models\classes\LtiService; @@ -101,6 +102,12 @@ public function launch(): void ->get(LtiService::class) ->startLti1p3Session($ltiMessage, $user); + $this->getServiceLocator() + ->getContainer() + ->get(ThemeService::SERVICE_ID) + ->setCurrentTheme('portal'); + + $this->forward('run', null, null, $_GET); } diff --git a/models/classes/theme/PortalThemeDetailProvider.php b/models/classes/theme/PortalThemeDetailProvider.php new file mode 100644 index 00000000..0c2cab60 --- /dev/null +++ b/models/classes/theme/PortalThemeDetailProvider.php @@ -0,0 +1,58 @@ +isSessionFromPortal()) { + return PortalTheme::THEME_ID; + }; + + $defaultTheme = new DefaultTheme(); + return $defaultTheme->getId(); + } + + /** + * @inheritDoc + */ + public function isHeadless(): bool + { + return false; + } + + private function isSessionFromPortal(): bool + { + $session = SessionManager::getSession(); + return $session instanceof TaoLtiSession + && !empty($session->getContexts(TenantDataSessionContext::class)); + } +} diff --git a/scripts/install/UnregisterLtiPortalTheme.php b/scripts/install/UnregisterLtiPortalTheme.php index 6d7287a3..d731e092 100644 --- a/scripts/install/UnregisterLtiPortalTheme.php +++ b/scripts/install/UnregisterLtiPortalTheme.php @@ -28,6 +28,7 @@ use oat\tao\model\theme\PortalTheme; use oat\tao\model\theme\ThemeServiceInterface; use oat\taoDelivery\scripts\install\installDeliveryFields; +use oat\taoLti\models\classes\theme\PortalThemeDetailProvider; use oat\taoStyles\model\service\PersistenceThemeService; class UnregisterLtiPortalTheme extends installDeliveryFields @@ -41,10 +42,14 @@ public function __invoke($params = []) $extManager = $this->getServiceManager()->get(common_ext_ExtensionsManager::class); if ($extManager->isInstalled('taoStyles')) { unset($oldConfig['available']); + $oldConfig['themeDetailsProviders'] = [ + new PortalThemeDetailProvider() + ]; $revertedService = $this->propagate(new PersistenceThemeService($oldConfig)); $this->getServiceManager()->register(ThemeServiceInterface::SERVICE_ID, $revertedService); $revertedService->addTheme(new PortalTheme(), false); $revertedService->addTheme(new DefaultTheme(), false); + return; } From fe2227f368ff5433d8433edc8415a3e5bd10effd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Marsza=C5=82?= Date: Tue, 11 Jun 2024 09:15:34 +0200 Subject: [PATCH 06/10] fix: UnregisterLtiPortal can now define current theme if not defined. --- scripts/install/UnregisterLtiPortalTheme.php | 36 +++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/scripts/install/UnregisterLtiPortalTheme.php b/scripts/install/UnregisterLtiPortalTheme.php index d731e092..615ac6c9 100644 --- a/scripts/install/UnregisterLtiPortalTheme.php +++ b/scripts/install/UnregisterLtiPortalTheme.php @@ -26,9 +26,12 @@ use oat\oatbox\service\ConfigurableService; use oat\tao\model\theme\DefaultTheme; use oat\tao\model\theme\PortalTheme; +use oat\tao\model\theme\ThemeService; use oat\tao\model\theme\ThemeServiceInterface; +use oat\tao\scripts\install\RegisterTaoUpdateEventListener; use oat\taoDelivery\scripts\install\installDeliveryFields; use oat\taoLti\models\classes\theme\PortalThemeDetailProvider; +use oat\taoLti\models\classes\theme\PortalThemeService; use oat\taoStyles\model\service\PersistenceThemeService; class UnregisterLtiPortalTheme extends installDeliveryFields @@ -40,8 +43,11 @@ public function __invoke($params = []) $oldConfig = $service->getOptions(); /** @var common_ext_ExtensionsManager $extManager */ $extManager = $this->getServiceManager()->get(common_ext_ExtensionsManager::class); + //If taoStyles is installed, we had PersistenceThemeService used as theming.conf.php and we should still use it if ($extManager->isInstalled('taoStyles')) { + //On taoLtiThemeService registration we migrated all configs and we may encounter some unused configs unset($oldConfig['available']); + //This provider will allow to display Portal Theme $oldConfig['themeDetailsProviders'] = [ new PortalThemeDetailProvider() ]; @@ -55,9 +61,37 @@ public function __invoke($params = []) //Make sure current theme is set if (!isset($oldConfig['current'])) { - $oldConfig['current'] = 'default'; + $oldConfig = $this->defineCurrent($oldConfig); + } + + if ($service instanceof PortalThemeService) { + $reverseService = $this->propagate(new ThemeService($oldConfig)); + $this->getServiceManager()->register(ThemeServiceInterface::SERVICE_ID, $reverseService); } $service->setOptions($oldConfig); } + + private function defineCurrent(array $config): array + { + if (!isset($config['available'])) { + $config['available'] = [ + 'default' => DefaultTheme::class, + 'portal' => array( + 'class' => 'oat\\tao\\model\\theme\\PortalTheme', + 'options' => array() + ) + ]; + } + + if (!isset($config['available']['default'])) { + $config['available']['default'] = DefaultTheme::class; + } + + if (!isset($config['current'])) { + $config['current'] = 'default'; + } + + return $config; + } } From 5cd185a031322ee965db64a7b29ddb788db0ac21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Marsza=C5=82?= Date: Tue, 11 Jun 2024 10:01:24 +0200 Subject: [PATCH 07/10] fix: UnregisterLtiPortal making sure config for PersistenceThemeService is valid. PortalThemeDetailProvider will return empty sting if session not from portal --- .../theme/PortalThemeDetailProvider.php | 3 +-- scripts/install/UnregisterLtiPortalTheme.php | 23 +++++++++++++++---- 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/models/classes/theme/PortalThemeDetailProvider.php b/models/classes/theme/PortalThemeDetailProvider.php index 0c2cab60..172a3c22 100644 --- a/models/classes/theme/PortalThemeDetailProvider.php +++ b/models/classes/theme/PortalThemeDetailProvider.php @@ -37,8 +37,7 @@ public function getThemeId(): string return PortalTheme::THEME_ID; }; - $defaultTheme = new DefaultTheme(); - return $defaultTheme->getId(); + return ''; } /** diff --git a/scripts/install/UnregisterLtiPortalTheme.php b/scripts/install/UnregisterLtiPortalTheme.php index 615ac6c9..1899867e 100644 --- a/scripts/install/UnregisterLtiPortalTheme.php +++ b/scripts/install/UnregisterLtiPortalTheme.php @@ -23,12 +23,12 @@ namespace oat\taoLti\scripts\install; use common_ext_ExtensionsManager; +use Exception; use oat\oatbox\service\ConfigurableService; use oat\tao\model\theme\DefaultTheme; use oat\tao\model\theme\PortalTheme; use oat\tao\model\theme\ThemeService; use oat\tao\model\theme\ThemeServiceInterface; -use oat\tao\scripts\install\RegisterTaoUpdateEventListener; use oat\taoDelivery\scripts\install\installDeliveryFields; use oat\taoLti\models\classes\theme\PortalThemeDetailProvider; use oat\taoLti\models\classes\theme\PortalThemeService; @@ -44,9 +44,13 @@ public function __invoke($params = []) /** @var common_ext_ExtensionsManager $extManager */ $extManager = $this->getServiceManager()->get(common_ext_ExtensionsManager::class); //If taoStyles is installed, we had PersistenceThemeService used as theming.conf.php and we should still use it - if ($extManager->isInstalled('taoStyles')) { - //On taoLtiThemeService registration we migrated all configs and we may encounter some unused configs - unset($oldConfig['available']); + if ($extManager->isInstalled('taoStyles') && $service instanceof PortalThemeService) { + try { + $oldConfig = $this->validateConfig($oldConfig); + } catch (Exception $e) { + $this->getLogger()->error($e->getMessage()); + return; + } //This provider will allow to display Portal Theme $oldConfig['themeDetailsProviders'] = [ new PortalThemeDetailProvider() @@ -94,4 +98,15 @@ private function defineCurrent(array $config): array return $config; } + + private function validateConfig(array $oldConfig): array + { + //On taoLtiThemeService registration we migrated all configs and we may encounter some unused configs + unset($oldConfig['available']); + if (!isset($oldConfig['persistence'])) { + throw new Exception('Missing previous config for PersistenceThemeService'); + } + + return $oldConfig; + } } From 825380682f34333a8efb867d6ab84c2e1268c619 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Marsza=C5=82?= Date: Tue, 11 Jun 2024 10:26:57 +0200 Subject: [PATCH 08/10] fix: Remove setting current theme from controller. Remove RegisterPortalTheme. Remove reference to RegisterPortalTheme in manifest and replace it with RegisterPortalThemeDetailProvider --- controller/AuthoringTool.php | 6 ------ manifest.php | 5 ++--- ... => RegisterPortalThemeDetailProvider.php} | 21 +++++++------------ scripts/install/UnregisterLtiPortalTheme.php | 4 ++-- 4 files changed, 11 insertions(+), 25 deletions(-) rename scripts/install/{RegisterPortalTheme.php => RegisterPortalThemeDetailProvider.php} (57%) diff --git a/controller/AuthoringTool.php b/controller/AuthoringTool.php index e0b7f3b2..d2436ce5 100644 --- a/controller/AuthoringTool.php +++ b/controller/AuthoringTool.php @@ -102,12 +102,6 @@ public function launch(): void ->get(LtiService::class) ->startLti1p3Session($ltiMessage, $user); - $this->getServiceLocator() - ->getContainer() - ->get(ThemeService::SERVICE_ID) - ->setCurrentTheme('portal'); - - $this->forward('run', null, null, $_GET); } diff --git a/manifest.php b/manifest.php index d304c6c9..1a757a3e 100755 --- a/manifest.php +++ b/manifest.php @@ -19,10 +19,8 @@ * Copyright (c) 2013-2021 (original work) Open Assessment Technologies SA (under the project TAO-PRODUCT); */ -use oat\ltiTestReview\controller\Review; use oat\tao\model\accessControl\func\AccessRule; use oat\tao\model\user\TaoRoles; -use oat\taoLti\controller\AuthoringTool; use oat\taoLti\controller\CookieUtils; use oat\taoLti\controller\Security; use oat\taoLti\models\classes\LtiRoles; @@ -30,7 +28,7 @@ use oat\taoLti\scripts\install\CreateLti1p3RegistrationSnapshotSchema; use oat\taoLti\scripts\install\GenerateKeys; use oat\taoLti\scripts\install\GenerisSearchWhitelist; -use oat\taoLti\scripts\install\RegisterPortalTheme; +use oat\taoLti\scripts\install\RegisterPortalThemeDetailProvider; use oat\taoLti\scripts\install\SetupServices; use oat\taoLti\scripts\install\MapLtiSectionVisibility; use oat\taoLti\scripts\update\Updater; @@ -67,6 +65,7 @@ MapLtiSectionVisibility::class, GenerisSearchWhitelist::class, CreateLti1p3RegistrationSnapshotSchema::class, + RegisterPortalThemeDetailProvider::class, ] ], 'update' => Updater::class, diff --git a/scripts/install/RegisterPortalTheme.php b/scripts/install/RegisterPortalThemeDetailProvider.php similarity index 57% rename from scripts/install/RegisterPortalTheme.php rename to scripts/install/RegisterPortalThemeDetailProvider.php index 12760d7e..989d4c8d 100644 --- a/scripts/install/RegisterPortalTheme.php +++ b/scripts/install/RegisterPortalThemeDetailProvider.php @@ -22,24 +22,17 @@ namespace oat\taoLti\scripts\install; -use oat\oatbox\config\ConfigurationService; use oat\oatbox\extension\InstallAction; -use oat\tao\model\theme\PortalTheme; use oat\tao\model\theme\ThemeServiceInterface; -use oat\taoLti\models\classes\theme\PortalThemeService; -class RegisterPortalTheme extends InstallAction +class RegisterPortalThemeDetailProvider extends InstallAction { - public function __invoke($params = []) + public function __invoke($params) { - /** @var ConfigurationService $previousThemeService */ - $previousThemeService = $this->getServiceManager()->get(ThemeServiceInterface::SERVICE_ID); - - /** @var ThemeServiceInterface $service */ - $service = $this->propagate(new PortalThemeService()); - $service->setOptions($previousThemeService->getOptions()); - $service->addTheme(new PortalTheme(), false); - - $this->getServiceManager()->register(ThemeServiceInterface::SERVICE_ID, $service); + $service = $this->getServiceManager()->get(ThemeServiceInterface::SERVICE_ID); + $themeDetailsProviders = $service->getOption('themeDetailsProviders'); + $themeDetailsProviders[] = new \oat\taoLti\models\classes\theme\PortalThemeDetailProvider(); + $service->setOption('themeDetailsProviders', $themeDetailsProviders); + $this->registerService(ThemeServiceInterface::SERVICE_ID, $service); } } diff --git a/scripts/install/UnregisterLtiPortalTheme.php b/scripts/install/UnregisterLtiPortalTheme.php index 1899867e..01564cb3 100644 --- a/scripts/install/UnregisterLtiPortalTheme.php +++ b/scripts/install/UnregisterLtiPortalTheme.php @@ -24,17 +24,17 @@ use common_ext_ExtensionsManager; use Exception; +use oat\oatbox\extension\InstallAction; use oat\oatbox\service\ConfigurableService; use oat\tao\model\theme\DefaultTheme; use oat\tao\model\theme\PortalTheme; use oat\tao\model\theme\ThemeService; use oat\tao\model\theme\ThemeServiceInterface; -use oat\taoDelivery\scripts\install\installDeliveryFields; use oat\taoLti\models\classes\theme\PortalThemeDetailProvider; use oat\taoLti\models\classes\theme\PortalThemeService; use oat\taoStyles\model\service\PersistenceThemeService; -class UnregisterLtiPortalTheme extends installDeliveryFields +class UnregisterLtiPortalTheme extends InstallAction { public function __invoke($params = []) { From 04f5d0c4ca0a074127de7f64446fb374ea5dd132 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Marsza=C5=82?= Date: Tue, 11 Jun 2024 10:53:54 +0200 Subject: [PATCH 09/10] fix: We want to always include PortalThemeDetailProvider to recognise portal entry --- scripts/install/UnregisterLtiPortalTheme.php | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/scripts/install/UnregisterLtiPortalTheme.php b/scripts/install/UnregisterLtiPortalTheme.php index 01564cb3..a03b0537 100644 --- a/scripts/install/UnregisterLtiPortalTheme.php +++ b/scripts/install/UnregisterLtiPortalTheme.php @@ -41,6 +41,14 @@ public function __invoke($params = []) /** @var ThemeServiceInterface|ConfigurableService $service */ $service = $this->getServiceManager()->get(ThemeServiceInterface::SERVICE_ID); $oldConfig = $service->getOptions(); + + //This provider will allow to display Portal Theme + if (!isset($oldConfig['themeDetailsProviders'])) { + $oldConfig['themeDetailsProviders'] = [ + new PortalThemeDetailProvider() + ]; + } + /** @var common_ext_ExtensionsManager $extManager */ $extManager = $this->getServiceManager()->get(common_ext_ExtensionsManager::class); //If taoStyles is installed, we had PersistenceThemeService used as theming.conf.php and we should still use it @@ -51,10 +59,7 @@ public function __invoke($params = []) $this->getLogger()->error($e->getMessage()); return; } - //This provider will allow to display Portal Theme - $oldConfig['themeDetailsProviders'] = [ - new PortalThemeDetailProvider() - ]; + $revertedService = $this->propagate(new PersistenceThemeService($oldConfig)); $this->getServiceManager()->register(ThemeServiceInterface::SERVICE_ID, $revertedService); $revertedService->addTheme(new PortalTheme(), false); @@ -74,6 +79,7 @@ public function __invoke($params = []) } $service->setOptions($oldConfig); + $this->getServiceManager()->register(ThemeServiceInterface::SERVICE_ID, $service); } private function defineCurrent(array $config): array From 65216fc4117dc96541e3eefeb7d41d1b562de6d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Marsza=C5=82?= Date: Tue, 11 Jun 2024 11:05:25 +0200 Subject: [PATCH 10/10] fix: When upgrading from taoLti v15.19.2 we will not pollute PersistenceThemeService config --- scripts/install/UnregisterLtiPortalTheme.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install/UnregisterLtiPortalTheme.php b/scripts/install/UnregisterLtiPortalTheme.php index a03b0537..e01d9bb7 100644 --- a/scripts/install/UnregisterLtiPortalTheme.php +++ b/scripts/install/UnregisterLtiPortalTheme.php @@ -69,7 +69,7 @@ public function __invoke($params = []) } //Make sure current theme is set - if (!isset($oldConfig['current'])) { + if (!isset($oldConfig['current']) && !($service instanceof PersistenceThemeService)) { $oldConfig = $this->defineCurrent($oldConfig); }