Fix blank personal settings page from mismatched bundle names
Build main artifact / package (push) Successful in 1m11s
Lint info.xml / xml-lint (push) Successful in 14s
Lint PHP / php-lint (8.2) (push) Successful in 48s
Lint PHP / php-lint (8.3) (push) Successful in 39s
Lint PHP / php-lint (8.4) (push) Successful in 34s
PHPUnit / unit-tests (push) Successful in 37s

@nextcloud/vite-config prefixes every entry name with the app id, so the
entry "workflow-deck-automation-personal-settings" was emitted as
js/workflow_deck_automation-workflow-deck-automation-personal-settings.mjs
while Util::addScript() was still asking for the unprefixed name. Nextcloud
found neither the script nor the style, so only the empty mount div rendered
and the settings page stayed blank.

Shorten the entry to "personal-settings" and pass the full on-disk basename
(APP_ID . '-personal-settings') to addScript()/addStyle(). Document the
prefix rule and the intentionally near-empty CSS entry stub in CLAUDE.md.
This commit is contained in:
Patrick Niebeling
2026-08-13 13:38:38 +02:00
parent c5bf6f8f0d
commit d2f6640d3d
3 changed files with 8 additions and 3 deletions
+3 -2
View File
@@ -11,8 +11,9 @@ use OCP\Util;
class Personal implements ISettings {
public function getForm(): TemplateResponse {
Util::addScript(Application::APP_ID, 'workflow-deck-automation-personal-settings');
Util::addStyle(Application::APP_ID, 'workflow-deck-automation-personal-settings');
// The bundle names carry the app-id prefix that @nextcloud/vite-config adds.
Util::addScript(Application::APP_ID, Application::APP_ID . '-personal-settings');
Util::addStyle(Application::APP_ID, Application::APP_ID . '-personal-settings');
return new TemplateResponse(Application::APP_ID, 'settings/personal', [], '');
}