Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show correct "Rows to display" on Evolution graph #18781

Closed
dev-101 opened this issue Feb 11, 2022 · 4 comments · Fixed by #19349
Closed

Show correct "Rows to display" on Evolution graph #18781

dev-101 opened this issue Feb 11, 2022 · 4 comments · Fixed by #19349
Assignees
Labels
Bug For errors / faults / flaws / inconsistencies etc. Regression Indicates a feature used to work in a certain way but it no longer does even though it should.
Milestone

Comments

@dev-101
Copy link

dev-101 commented Feb 11, 2022

This issue is related to one I reported before, just can't find it right now. In older issue I complained that "Rows to display" drop-down selector is missing if we use default "Last 30 days" configuration in Admin Dashboard > Personal > Settings to be shown in widgets (etc.) when we open /matomo/index.php URL (default dashboard), while on Behavior > Pages > Open Row Evolution (for particular page) reports. Now, there is another problem, different than the old one.

The affected function: (screenshot from Behavior > Pages > Open Row Evolution on single row/page > drop-down button under Chart area)

matomo-row-evolution-range-bug

How to reproduce:

  1. Configure Matomo to display "Last 30 days" by default in widgets reports when you open basic /matomo/index.php URL (setting is located in Admin Dashboard > Personal > Settings, as you prob already know).

  2. Open basic Matomo URL, then go to Behavior > Pages > then switch to single day in the calendar/data range selector [see * note] e.g. select yesterday (if you don't have enough today's hits) or today's date (if you have enough pages visits / data).

[note *] This is a very important step, because, as I already wrote about it before, the drop-down button in above screenshot will not appear otherwise! This is yet another bug/issue with ORE charts that should be resolved, but it is now not related to this bug report

  1. Now hover over each page and click on Open Row Evolution icon/button

  2. Chart will open, with drop-down range value at 30 by default. Change it to, say, 90. Wait until data loads, then close the page (hit anywhere outside the popup window or hit "X" at the top right corner of the popup window).

  3. Open another Open Row Evolution window for a different page. Chart still loads "30" but the drop-down selector remembers "90" from before! In order to actually load last 90 (days) report in the chart now you have to select another value, and then select again "90" to actually load last 90 days in the chart.

This was working fine before.

Is this reproducible on Matomo Online Demo (demo.matomo.cloud)?

No, funny thing is that it works OK there, but the explanation might be that you use "yesterday" as a default reporting date/range in the settings, so that your default URL looks like this:

https://demo.matomo.cloud/index.php?module=CoreHome&action=index&idSite=1&period=day&date=yesterday#?idSite=1&period=day&date=yesterday&segment=&category=Dashboard_Dashboard&subcategory=1

So, when you switch to Pages, you don't really have to change anything in the date range selector, in order to make Range drop-down button appear when you click on Open Row Evolution. Update: even if we manually select today's date, it still works OK in the demo site.

Conclusion

This bug is consistent on 3 different installations, all installed at different time points, and running on different systems. I tried logging-out and signing back, but that didn't help.

@dev-101 dev-101 added the Potential Bug Something that might be a bug, but needs validation and confirmation it can be reproduced. label Feb 11, 2022
@bx80
Copy link
Contributor

bx80 commented Feb 13, 2022

Hi @dev-101, thanks for reporting this and providing such helpful recreation steps. I can confirm that this issue is present in the current development branch.

@bx80 bx80 added Bug For errors / faults / flaws / inconsistencies etc. Regression Indicates a feature used to work in a certain way but it no longer does even though it should. and removed Potential Bug Something that might be a bug, but needs validation and confirmation it can be reproduced. labels Feb 13, 2022
@justinvelluppillai justinvelluppillai added this to the 4.12.0 milestone Jun 7, 2022
@peterhashair peterhashair self-assigned this Jun 10, 2022
@peterhashair
Copy link
Contributor

peterhashair commented Jun 13, 2022

I guess there are 2 solutions here, remove the code here to reload the table, that will keep the 90 days as the memory, and update the graphic (maybe a condition check would be better if param changes compare to the table data)

if (!is_null($this->dataTable)) {
// data table is already there
// this happens when setDataTable has been used
return $this->dataTable;
}

another solution is to revert this part here, which will ignore the previous select, reset back to default day

$defaultLastN = $this->config->custom_parameters[$lastNParamName] ?? self::getDefaultLastN($period);

@dev-101
Copy link
Author

dev-101 commented Sep 18, 2022

This issue is still present, but this issue has been closed? I still have this problem.

Confirmed on 2 different systems/setups.

Please carefully follow How to reproduce steps in OP.

@peterhashair
Copy link
Contributor

@dev-101 thanks for the feedback, but I can't see that problem exists on my local or our cloud, generate a video for the steps I am following. Another thing that could help is this command ./console cache:clear to clean the cache, if that helps.

mysite.-.2022-09-19.-.Web.Analytics.Reports.-.Matomo.mp4

@justinvelluppillai justinvelluppillai changed the title Pages > Open Row Evolution > "Rows to display" button has "memory effect" Show correct "Rows to display" on Evolution graph Sep 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc. Regression Indicates a feature used to work in a certain way but it no longer does even though it should.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants