Skip to content

fix(theming): read image keys from Mime-suffixed key in theming:config - #64381

Open
shawon9324 wants to merge 10 commits into
nextcloud:masterfrom
shawon9324:fix/theming-config-image-key-read
Open

shawon9324 wants to merge 10 commits into
nextcloud:masterfrom
shawon9324:fix/theming-config-image-key-read

Conversation

@shawon9324

@shawon9324 shawon9324 commented Sep 15, 2026

Copy link
Copy Markdown

Summary

Running occ theming:config logo reported that the logo was not set, even
though theming.logoMime was correctly set to image/png. The single-key
image read path was the only branch using the wrong storage key; the list-all
image branch and the image write path already correctly appended the Mime
suffix. This change updates that lookup to use the correct image MIME
configuration key.

Verified on a local instance with theming.logoMime set to image/png:

# before this change:
$ occ theming:config logo
logo is currently not set

# after this change:
$ occ theming:config logo
logo is currently set to image/png

Checklist

  • Code is properly formatted
  • Sign-off message is added to all commits
  • Tests (unit, integration, api and/or acceptance) are included
  • Screenshots before/after for front-end changes
  • Documentation (manuals or wiki) has been updated or is not required
  • Backports requested where applicable
  • Labels added where applicable
  • Milestone added for target branch/version

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

…ng:config

occ theming:config <key> always reported image keys (background, logo,
logoheader, favicon) as "currently not set", even when a value was
configured and served correctly by the web UI.

Image values are stored under "<key>Mime" in the theming app config,
a convention already used by this command's list-all branch and by
the value-writing branch further down. The single-key read branch was
the only one still reading the plain key, so it never found the
stored value.

Assisted-by: ClaudeCode:claude-sonnet-5
Signed-off-by: Md. Shahriar Karim Shawon <shawon9324@gmail.com>
@shawon9324
shawon9324 requested a review from a team as a code owner September 15, 2026 18:26
@shawon9324
shawon9324 requested review from CarlSchwan, come-nc, leftybournes and salmart-dev and a lite review from Copilot and removed request for a team September 15, 2026 18:26

Copilot AI left a comment

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.

Warning

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

Pull request overview

Fixes occ theming:config <imageKey> so single-key reads use the MIME-suffixed config key (e.g., logoMime) consistently with the image write path and the list-all branch.

Changes:

  • Update UpdateConfig to read image keys from <key>Mime instead of <key>.
  • Add PHPUnit coverage for regular key reads and image key MIME-suffixed reads.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
apps/theming/lib/Command/UpdateConfig.php Fixes the config lookup for image keys by using the MIME-suffixed storage key.
apps/theming/tests/Command/UpdateConfigTest.php Adds unit tests validating the corrected lookup behavior for regular and image keys.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread apps/theming/tests/Command/UpdateConfigTest.php
Comment thread apps/theming/lib/Command/UpdateConfig.php
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: occ theming:config <imageKey>` reads from wrong storage key

2 participants