Skip to content

fix(ui): render HTML body error responses as blank pages#12348

Merged
ChristophWurst merged 1 commit into
mainfrom
fix/ui/render-html-error-response-as-blank
Jan 29, 2026
Merged

fix(ui): render HTML body error responses as blank pages#12348
ChristophWurst merged 1 commit into
mainfrom
fix/ui/render-html-error-response-as-blank

Conversation

@ChristophWurst

Copy link
Copy Markdown
Member

'none' would actually render the Nextcloud headers (app menu etc). This only shows our HTML.

Fixes

Error: lib/Controller/MessagesController.php:585:6: InvalidArgument: Argument 4 of OCP\AppFramework\Http\TemplateResponse::__construct expects ''|'base'|'error'|'guest'|'public'|'user', but 'none' provided (see https://psalm.dev/004)
Error: lib/Controller/MessagesController.php:639:5: InvalidArgument: Argument 4 of OCP\AppFramework\Http\TemplateResponse::__construct expects ''|'base'|'error'|'guest'|'public'|'user', but 'none' provided (see https://psalm.dev/004)

Ref nextcloud/server#57859

Comment thread lib/Controller/MessagesController.php Outdated
'error',
['message' => 'Not allowed'],
'none'
''

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
''
TemplateResponse::RENDER_AS_BLANK,

Comment thread lib/Controller/MessagesController.php Outdated
'error',
['message' => $ex->getMessage()],
'none'
''

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
''
TemplateResponse::RENDER_AS_BLANK,

Signed-off-by: Christoph Wurst <1374172+ChristophWurst@users.noreply.github.com>
@ChristophWurst ChristophWurst force-pushed the fix/ui/render-html-error-response-as-blank branch from b597ede to a391aba Compare January 29, 2026 15:54
@ChristophWurst ChristophWurst merged commit e28f9e7 into main Jan 29, 2026
41 of 43 checks passed
@ChristophWurst ChristophWurst deleted the fix/ui/render-html-error-response-as-blank branch January 29, 2026 17:20
@kesselb

kesselb commented Jan 29, 2026

Copy link
Copy Markdown
Contributor

/backport to stable5.7

@kesselb

kesselb commented Jan 29, 2026

Copy link
Copy Markdown
Contributor

/backport to stable5.6

@kesselb

kesselb commented Jan 30, 2026

Copy link
Copy Markdown
Contributor

/backport to stable5.7

@backportbot

backportbot Bot commented Jan 30, 2026

Copy link
Copy Markdown

The backport to stable5.7 failed. Please do this backport manually.

# Switch to the target branch and update it
git checkout stable5.7
git pull origin stable5.7

# Create the new backport branch
git checkout -b backport/12348/stable5.7

# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts, resolve them
git cherry-pick a391abad

# Push the cherry pick commit to the remote repository and open a pull request
git push origin backport/12348/stable5.7

Error: Failed to check for changes with origin/stable5.7: No changes found in backport branch


Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.

@kesselb

kesselb commented Jan 30, 2026

Copy link
Copy Markdown
Contributor

/backport to stable5.6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants