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

Spaces are converted to %20 in Acquisition Overview Chart #20198

Closed
Krisseck opened this issue Jan 11, 2023 · 3 comments
Closed

Spaces are converted to %20 in Acquisition Overview Chart #20198

Krisseck opened this issue Jan 11, 2023 · 3 comments
Labels
Bug For errors / faults / flaws / inconsistencies etc. c: Design / UI For issues that impact Matomo's user interface or the design overall. duplicate For issues that already existed in our issue tracker and were reported previously. Regression Indicates a feature used to work in a certain way but it no longer does even though it should.

Comments

@Krisseck
Copy link

When viewing the chart for Acquisition Overview, for example the text "Search Engines" is translated to "Search%20Engines" in the chart, and the data is not shown.

Expected Behavior

The chart should show correct labels for the records, and it should actually show the related data.

Current Behavior

Records with spaces (%20) in them are not shown in chart, and the label is wrong.

image

image

Possible Solution

Convert space characters correctly in the chart.

Also, if you manually click on the relevant checkboxes on "Records to plot", it will show them correctly.

Steps to Reproduce (for Bugs)

  1. Go To "Acquisition"
  2. Go To "Overview"
  3. The chart should have labels with "%20" in them.

Note: I cannot reproduce this bug in the demo, since records with spaces in them (like "Search Engines") is not pre-selected. This bug only seems to occur if they are pre-selected on page load.

Context

It's just bad UX :) to show labels with "%20" in them and no data.

Your Environment

  • Matomo Version: 4.13.0
  • PHP Version: 8.0.26
  • Server Operating System: Ubuntu (running official docker image)
  • Additionally installed plugins:
  • Browser: Firefox 108
  • Operating System: Arch Linux
@Krisseck Krisseck added Potential Bug Something that might be a bug, but needs validation and confirmation it can be reproduced. To Triage An issue awaiting triage by a Matomo core team member labels Jan 11, 2023
@bx80
Copy link
Contributor

bx80 commented Jan 12, 2023

Thanks for spotting this @Krisseck, I can confirm this is an issue when metrics are pre-selected 👍

The steps I used for recreation were:

  1. Go To "Acquisition > Overview"
  2. In the "Evolution over period" chart choose a metric with spaces in the name, eg. "Search Engines", it will be displayed properly at this point.
  3. Navigate away to another page, eg. the Dashboard
  4. Return to "Acquisition > Overview", the pre-selected metrics which should have spaces will have %20 instead.

@bx80 bx80 added Bug For errors / faults / flaws / inconsistencies etc. c: Design / UI For issues that impact Matomo's user interface or the design overall. 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. To Triage An issue awaiting triage by a Matomo core team member labels Jan 12, 2023
@bx80 bx80 added this to the For Prioritization milestone Jan 12, 2023
@sgiehl
Copy link
Member

sgiehl commented Jan 12, 2023

This might be a regression from #13935
as it added a url encode to the parameters:

rows = rows.map(encodeURIComponent);
$(self).trigger('seriesPicked', [columns, rows]);
// inform dashboard widget about changed parameters (to be restored on reload)
var UI = require('piwik/UI');
var params = {
columns: columns,
columns_to_display: columns,
rows: rows,
rows_to_display: rows
};

Guess we can't simply remove it again, as it was added for some reason. Guess we might need to decode it somewhere to get that fixed.

@michalkleiner michalkleiner added the duplicate For issues that already existed in our issue tracker and were reported previously. label Aug 28, 2023
@sgiehl
Copy link
Member

sgiehl commented Aug 29, 2023

This one is a duplicate of #21051 and will be fixed with #21165

@sgiehl sgiehl closed this as not planned Won't fix, can't repro, duplicate, stale Aug 29, 2023
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. c: Design / UI For issues that impact Matomo's user interface or the design overall. duplicate For issues that already existed in our issue tracker and were reported previously. Regression Indicates a feature used to work in a certain way but it no longer does even though it should.
Projects
None yet
Development

No branches or pull requests

4 participants