TemplateResponse: Enforced theme not respected for `renderAs = BASE`
Nobody has claimed this yet.
- 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:
- config.php
'enforce_theme' => 'light' - Create a form
- Embed the iframe into another website
- Set OS settings to dark mode
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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