After uploading a custom theme a fatal eror occurs

Hello, i wanted to replace an older custom theme with a new one and found this template online

I’ve tried to even make is smaller and just wrote a plugin.json and a main.less under a stylesheet directory.

Now i’ve uploaded the Theme as a zip, but it seems it had some errors which lead to a fatal error in our matomo installation.

The error is: An exception has been thrown during the rendering of a template ("ParseError: Unexpected input in anonymous-file-0.less on line 9836, column 739834| @theme-color-menu-contrast-textSelected: @theme-color-brand;9835| @theme-color-menu-contrast-textActive: @theme-color-brand;9836| @theme-color-menu-contrast-background: @theme-color-header-background").

On the fatal error page it had a button to deactivate the theme which did nothing but forward me to an an error occurred page with “The parameter ‘redirectTo’ isn’t set in the Request, and a default value wasn’t provided.”

Even when i provided a redirectTo in the link of the deactivate button it didnt seem to deactivate the theme as the same first error from above still is there.

Now i wonder how a simple less error leads to a fatal error for the whole matomo and what i can do now as the matomo is not responding at all besides showing that error (deleting the theme directory didnt do anything aswell).

Thanks in advance!

The error seems to come from matomo/core/AssetManager/UIAssetMerger/StylesheetUIAssetMerger.php line 53

And i also deleted the cache in hopes of beeing able to access matomo again and maybe delete or deactivate the plugin again but it didnt help.

I’ve deleted the entry for the theme in the config.ini.php

This way i could access matomo again and remove the faulty custom theme.

1 Like