Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions lib/private/TemplateLayout.php
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,12 @@ public function __construct($renderAs, $appId = '') {
}

// Set body data-theme
$themesService = \OCP\Server::get(\OCA\Theming\Service\ThemesService::class);
$this->assign('enabledThemes', $themesService->getEnabledThemes());
try {
$themesService = \OCP\Server::get(\OCA\Theming\Service\ThemesService::class);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How can this class not exist? theming is force enabled - always.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

before installing?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it seems that it is not loaded during setup process

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it testable with CI?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Best would be to have e2e test for web setup (and also login flow...), most basic way would be to check if the setup page does not throw a 500 (before we install NC via occ)?

docker run --rm --volume .:/var/www/html -it ghcr.io/nextcloud/continuous-integration-php8.1:latest bash -c "(php -S 0.0.0.0:80 -t /var/www/html &) && curl --retry 5 --retry-connrefused -I localhost"

} catch (\OCP\AppFramework\QueryException) {
$themesService = null;
}
$this->assign('enabledThemes', $themesService?->getEnabledThemes() ?? []);

// Send the language, locale, and direction to our layouts
$lang = \OC::$server->get(IFactory::class)->findLanguage();
Expand Down
Loading