@issuesreporting opened this Issue on June 24th 2021

We upgraded Matomo from version 3.14.0 to 4.1.0 and observed a bug.
After upgrading to 4.2.1 and later 4.3.1 bug is still there.

The error message we observe after upgrade to 4.1.0 and every version mentioned is following:


   An exception has been thrown during the rendering of a template ("Segment cannot be added because no sql segment is set").
   in /usr/local/www/matomo/plugins/CoreHome/templates/getDefaultIndexView.twig line 7  
  • Matomo Version: 4.1.0, 4.2.1, 4.3.1
  • PHP Version:7.2
  • Server Operating System: Free BSD 12.2-RELEASE amd64
@sgiehl commented on June 24th 2021 Member

Hi @issuesreporting. How exactly did you perform the update? Using the auto update or did you perform it manually?

@issuesreporting commented on June 25th 2021

Using
php72 console core:update --yes

@diosmosis commented on June 27th 2021 Member

Hi @issuesreporting, are you using any plugins that aren't provided by default with Matomo? Can you access the system report and provide the result here (either through the UI or via the diagnostics:run command)?

@issuesreporting commented on June 29th 2021

With third party plugins and without third party plugins behavior is the same. No changes has been observed.

Here is log of diagnostic:run


% php72 console diagnostics:run
INFO [2021-06-28 23:23:03] 99888  Unable to test if mod_pagespeed is enabled: the request to http://unknown/console?module=Installation&action=getEmptyPageForSystemCheck failed
Required Private Directories:
    - WARNING Unable to execute check for https://statistics0.editedaddress.com/config/config.ini.php: curl_exec: SSL: no alternative certificate subject name matches target host name &<a href='/039'>#039</a>;statistics0.editedaddress.com&<a href='/039'>#039</a>;. Hostname requested was: statistics0.editedaddress.com
    - WARNING Unable to execute check for https://statistics0.editedaddress.com/tmp/: curl_exec: SSL: no alternative certificate subject name matches target host name &<a href='/039'>#039</a>;statistics0.editedaddress.com&<a href='/039'>#039</a>;. Hostname requested was: statistics0.editedaddress.com
    - WARNING Unable to execute check for https://statistics0.editedaddress.com/tmp/empty: curl_exec: SSL: no alternative certificate subject name matches target host name &<a href='/039'>#039</a>;statistics0.editedaddress.com&<a href='/039'>#039</a>;. Hostname requested was: statistics0.editedaddress.com
    - WARNING Unable to execute check for https://statistics0.editedaddress.com/lang/en.json: curl_exec: SSL: no alternative certificate subject name matches target host name &<a href='/039'>#039</a>;statistics0.editedaddress.com&<a href='/039'>#039</a>;. Hostname requested was: statistics0.editedaddress.com
    - OK All private directories are inaccessible from the internet.
File integrity: WARNING File integrity check failed and reported some errors. You should fix this issue and then refresh this page until it shows no error.Directories were found in your Matomo, but we didn't expect them.
--> Please delete these directories to prevent errors. <--Directory to delete: libs/bower_componentsTo delete all these directories at once, you can run this command:
rm -Rf /usr/local/www/matomo/libs/bower_componentsFiles were found in your Matomo, but we didn't expect them.
--> Please delete these files to prevent errors. <--File to delete: robots.txt.pkgsaveTo delete all these files at once, you can run this command:
rm "/usr/local/www/matomo/robots.txt.pkgsave"Errors below may be due to a partial or failed upload of Matomo files.
--> Try to reupload all the Matomo files in BINARY mode. <--File size mismatch: /usr/local/www/matomo/misc/log-analytics/import_logs.py (expected length: 106454, found: 106460)
Setup Cron (faster report loading): WARNING For optimal performance and a speedy Matomo, it is highly recommended to set up a crontab to automatically archive your reports, and to disable browser triggering in the Matomo settings. Learn more.
Browser and Auto-archiving enabled: WARNING It looks like both browser and auto archiving are enabled. Auto archiving last started 22 hours 23 min ago. If auto archiving is enabled, you should disable browser archiving in "General Settings".
Database abilities:
    - WARNING UTF8mb4 charsetYour database supports utf8mb4 charset, but your database tables have not been converted yet. You can do this by executing the command /usr/local/www/matomo/console core:convert-to-utf8mb4 or activating the automatic conversion in General Settings.This is required to be able to store 4-byte UTF8 characters. Unless utf8mb4 is available special characters, such as emojis, less common characters of asian languages, various historic scripts or mathematical symbols will be replaced with �. You can read more details about this topic in this FAQ.  - OK LOAD DATA INFILE
    - OK CREATE TEMPORARY TABLES
    - OK Changing transaction isolation level
Forced SSL Connection: WARNING We recommend using Matomo over secure SSL connections only. To prevent insecure access over http, add force_ssl = 1 to the General section in your Matomo config/config.ini.php file.Attention: Doing this without having set up a SSL certificate for using HTTPS will break Matomo.
6 warnings detected
@diosmosis commented on July 1st 2021 Member

@issuesreporting there doesn't seem to be anything of interest in the system report. And unfortunately the error doesn't have much context there. Would you be able to apply this patch: https://github.com/matomo-org/matomo/compare/17707-patch?expand=1 and provide the error message?

@issuesreporting commented on July 28th 2021

Segment cannot be added because no sql segment is set (for dimension Custom Variable name, ID = CustomVariables.CustomVariableName)

@sgiehl commented on July 28th 2021 Member

@issuesreporting was the custom variables plugin maybe disabled?

@issuesreporting commented on July 30th 2021

It was enabled. Disabling pluging CustomVariables solved problem. Is this the expected behavior?

Powered by GitHub Issue Mirror