Skip to content

[Bug]: Cannot change or reset primary color in theming #66706

Description

@midnight-taco

⚠️ This issue respects the following points: ⚠️

  • This is not a troubleshooting question, general support matter, or webserver/proxy problem, but likely a bug (if unsure, ask the Community Help Forum).
  • This issue is not already reported on Github OR solved at the Community Help Forum (I've searched!).
  • I'm using a maintained major version of Nextcloud Server and tested against the latest patch level. (Supported major versions and current patch levels).
  • I agree to follow Nextcloud's Code of Conduct.
  • I've tried my best to provide clear reproduction steps that someone unfamiliar with this bug could use to reproduce it.

Bug description

A user had set a primary color (let's say purple) and now cannot change nor reset it.

Steps to reproduce

  1. User > Appearance and accessibility
  2. Reset primary color (or alternatively choose another color, and click Choose)
  3. The color does appear to reset or change
  4. (Could not find a save button anywhere, so we refresh or click on another page)

Also tried clearing cookies, and logging in.
Also tried disabling user theming in the admin, and the user account simply displays a message "uer theming is disabled" and hides the buttons, but the original settings (purple) did not change.

Expected behavior

The color should reset permanently. Clicking on another page or refreshing should change the color.

Nextcloud Server version

35

Operating system

Debian/Ubuntu

PHP engine version

PHP 8.5

Web server

Apache (supported)

Database engine version

MySQL

Is this bug present after an update or on a fresh install?

None

Are you using the Nextcloud Server Encryption module?

Encryption is Disabled

What user-backends are you using?

  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other

Configuration report

NA

List of activated Apps

Default, except:
Collabora Online - Built-in CODE Server(Show details)
26.4.502
Nextcloud Office (Collabora)(Show details)
12.0.2

Nextcloud Signing status

No errors have been found.

Nextcloud Logs

Last log was from Nov 16, 2026.
This issue is happening Nov 17, 2026.

Additional info

No response

Activity

  1. susnux commented on Nov 18, 2026

    @susnux
    Contributor

    Also tried clearing cookies, and logging in.

    Have you tried to clear the browser cache?

  2. saiyyedfardeen commented on Nov 18, 2026

    @saiyyedfardeen

    I have opened a PR to fix this issue: #66772

    Cause & Fix Summary

    1. Frontend (UserSectionPrimaryColor.vue): <NcColorPicker> was missing a @submit handler and relied on a 1000ms debounced watcher, which caused quick refreshes to drop changes and re-saved the default hex color after clicking Reset primary color (overwriting the DELETE preference call).
    2. Stylesheet Cache Invalidation (BeforePreferenceListener.php & ThemingController.php): Theme stylesheets are cached for 24 hours (max-age=86400) via v={cacheBuster}. Neither changing/resetting primary_color nor toggling Disable user theming incremented the cache buster, causing browsers to serve the cached CSS with the previous color on page reload.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    0. Needs triagePending check for reproducibility or if it fits our roadmap35-feedbackbug

    Type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions