@MISTAnalytics opened this Issue on September 3rd 2020

In the Matomo site search report, the explanation is a bit confusing. It cannot be that there are 738.755 searches in July 2020? While the 'All visits' segment shows a total of 16.655 searches?

Search bug Matomo

Because currently when you hover over the help section in the site search report you will see two explanations and this is confusing.

Remove the latter sentence.

@tsteur commented on September 3rd 2020 Member

I can reproduce this and I'm pretty sure it's meant to say in the second sentence "0% of all 738.755 visits in Jul 2020".

@MISTAnalytics commented on September 4th 2020


Yes correct, this should be visits instead of searches.

@TheCrowned commented on October 2nd 2020

I'll take this and submit a PR :)

@TheCrowned commented on October 4th 2020

So, I've nailed this down to the file plugins/CoreVisualizations/templates/_dataTableViz_htmlTable_ratio.twig, where the second sentence is generated by
{% if totalPercentage|default is not empty %} {% set totalRatioTooltip = 'General_TotalRatioTooltip'|translate(totalPercentage, siteTotal|number(2,0), metricTitle, periodTitlePretty) %}

The problem is that metricTitle is defined earlier as
{% set metricTitle = translations[column]|default(column) %}
and is also used in the first sentence
{% set reportRatioTooltip = 'General_ReportRatioTooltip'|translate(label, rowPercentage|e('html_attr'), reportTotal|e('html_attr'), metricTitle|e('html_attr'), '"' ~ segmentTitlePretty ~ '"', translations[labelColumn]|default(labelColumn)|e('html_attr')) %}

Thus it looks like they cannot really be detached and whatever goes in the first sentence will go in the second as well, or am I wrong? I am wondering if that tooltip ever even worked fine, since looking bback at past commits it looks like the relevant file has always been the way it is now

(I'm having a bit of an issue with setting up a good dev environment because of #16515)

Powered by GitHub Issue Mirror