Admin UI fatal error after plugin activation: ".inDarkMode is undefined in anonymous-file-0.less"

We are running Matomo On-Premise and the admin UI became inaccessible immediately after activating/updating plugins.

The main desktop error is:

`An exception has been thrown during the rendering of a template (“.inDarkMode is undefined in anonymous-file-0.less”).`

Context:

- The issue started immediately after updating plugins.

- The instance is a fairly new Matomo 5 install, but not the newest version (5.8?). I believe it is not yet on 5.10.

- We understand Matomo 5.10 introduced Dark Mode support, so we are wondering if a plugin/theme is referencing newer dark-mode LESS/CSS that is not available in our installed Matomo version.

Questions:

1. Is `.inDarkMode is undefined in anonymous-file-0.less` typically caused by a plugin/theme version mismatch with Matomo core?

2. Is there a way to identify the plugin/theme responsible from the server?

3. Would disabling recently activated plugins via CLI be the recommended first step?

4. Is renaming recently modified plugin folders inside `/plugins/` a safe emergency workaround if the admin UI is inaccessible?

5. Is there any way to force the UI back to Light mode from config or CLI, or is this more likely a plugin stylesheet compatibility issue regardless of the selected theme?

6. Should we upgrade Matomo core to the latest version, or first disable the recently activated plugins and regain UI access?

Our preferred recovery path is to avoid restoring the database because significant configuration work was completed recently across multiple sites, including events and tracking setup.

Any guidance on the safest recovery sequence would be appreciated.

1 Like

Hi Steve, sorry you are seeing this. It seems to be a bug in Custom reports. Disabling that plugin should get you by. The team are working on fix to resolve this at the moment.

Hi Steve, the plugin has been updated. Could you please update your plugins and try again.