Logo upload fails and matomo crashes to Login screen

Hello there,

Unfortunately, I’ve needed to create an account here and ask for help as I couldn’t solve this issue even after extensive research.

When I try to upload a Logo, the following happens:
A POST request is initiated: XXX.index.php?module=CoreAdminHome&format=json&action=uploadCustomLogo

Just as expected, but then I immediately get thrown off to the Login screen with the following error message:
Error : Token is not valid.
See screenshot here:

Since I can’t get the upload to work, I posted my logo manually in the misc/user/ folder, and although the favicon worked after manually uploading, the logo does not. This is what’s really throwing me off.

Also, the Logo is shown in the settings (where you can choose the file to upload), but Matomo is not using it (in the navbar and stuff), but again the favicon works ok.

Any Ideas?

Hi,

This has been reported in

If you don’t want to wait for the next patch release, you can apply the fix yourself:

diff --git a/plugins/CoreAdminHome/templates/generalSettings.twig b/plugins/CoreAdminHome/templates/generalSettings.twig
index 84d7b52a411..f070cc97f14 100644
--- a/plugins/CoreAdminHome/templates/generalSettings.twig
+++ b/plugins/CoreAdminHome/templates/generalSettings.twig
@@ -182,6 +182,7 @@
             <form id="logoUploadForm" method="post" enctype="multipart/form-data" action="index.php?module=CoreAdminHome&format=json&action=uploadCustomLogo">
                 {% if fileUploadEnabled %}
                     <input type="hidden" name="token_auth" value="{{ token_auth }}"/>
+                    <input type="hidden" name="force_api_session" value="1"/>
 
                     {% if logosWriteable %}
                         <div class="alert alert-warning uploaderror" style="display:none;">