nextcloud / nextcloud/server

TemplateResponse: Enforced theme not respected for `renderAs = BASE`

Open
#54,818 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

0. Needs triage 31-feedback bug
Dominant language
PHP
Stars
36.9k
Forks
5.2k
Avg merge
2d 3h
Merged PRs (30d)
713

Description

Please use the 👍 reaction to show that you are affected by the same issue. Please don't comment if you have no relevant information to add!

Describe the bug
I have in config.php 'enforce_theme' => 'light', embedded forms are shown in dark mode (follows system settings)
If looks bad when embedding a dark form inside a light themed website.

To Reproduce
Steps to reproduce the behavior:

  1. config.php 'enforce_theme' => 'light'
  2. Create a form
  3. Embed the iframe into another website
  4. Set OS settings to dark mode
  5. Check embedded form

Expected behavior
I would like the embedded forms to respect the config.php settings.

Nextcloud (please complete the following information):

  • Nextcloud-Version: 31.0.5
  • Forms-Version: 5.1.0

Desktop (please complete the following information):

  • OS: macos
  • Browser: Chrome
  • Version: 136.0.7103.114

Smartphone (please complete the following information):

  • Device: Pixel 9
  • OS: Android 15
  • Browser Chrome
  • Version latest

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing TemplateResponse handling for renderAs = BASE and how the enforce_theme setting from config.php is applied to embedded forms. Reproduce the issue with the documented steps while the OS uses dark mode. Done means an embedded form follows the configured light theme rather than the system preference.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
frontend, web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.