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

Dashboard screen is broken when using unique visitors for range #14042

Closed
tsteur opened this issue Jan 29, 2019 · 0 comments · Fixed by #14332
Closed

Dashboard screen is broken when using unique visitors for range #14042

tsteur opened this issue Jan 29, 2019 · 0 comments · Fixed by #14332
Assignees
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Milestone

Comments

@tsteur
Copy link
Member

tsteur commented Jan 29, 2019

We have users experiencing this issue on the cloud. Example dashboard:

{"config":{"layout":"30-30-40"},"columns":[[{"uniqueId":"widgetVisitsSummarygetEvolutionGraphforceView1viewDataTablegraphEvolution","parameters":{"forceView":"1","viewDataTable":"graphEvolution","module":"VisitsSummary","action":"getEvolutionGraph","widget":1,"columns":["nb_uniq_visitors"],"columns_to_display":["nb_uniq_visitors"],"rows":[],"rows_to_display":[]},"isHidden":false},{"uniqueId":"widgetVisitsSummarygetforceView1viewDataTablesparklines","parameters":{"forceView":"1","viewDataTable":"sparklines","module":"VisitsSummary","action":"get","widget":1},"isHidden":false}],[{"uniqueId":"widgetCustomDimensionsgetCustomDimensionidDimension1","parameters":{"module":"CustomDimensions","action":"getCustomDimension","idDimension":"1","widget":1,"viewDataTable":"graphPie","columns":["nb_uniq_visitors"],"columns_to_display":["nb_uniq_visitors"],"rows":[],"rows_to_display":[]},"isHidden":false},{"uniqueId":"widgetCustomDimensionsgetCustomDimensionidDimension2","parameters":{"module":"CustomDimensions","action":"getCustomDimension","idDimension":"2","widget":1,"viewDataTable":"graphPie","columns":["nb_uniq_visitors"],"columns_to_display":["nb_uniq_visitors"],"rows":[],"rows_to_display":[]},"isHidden":false},{"uniqueId":"widgetCustomDimensionsgetCustomDimensionidDimension4","parameters":{"module":"CustomDimensions","action":"getCustomDimension","idDimension":"4","widget":1,"viewDataTable":"graphPie","columns":["nb_uniq_visitors"],"columns_to_display":["nb_uniq_visitors"],"rows":[],"rows_to_display":[]},"isHidden":false}],[{"uniqueId":"widgetCustomDimensionsgetCustomDimensionidDimension3","parameters":{"module":"CustomDimensions","action":"getCustomDimension","idDimension":"3","widget":1,"viewDataTable":"graphVerticalBar","columns":["nb_uniq_visitors"],"columns_to_display":["nb_uniq_visitors"],"rows":[],"rows_to_display":[]},"isHidden":false},{"uniqueId":"widgetCustomDimensionsgetCustomDimensionidDimension5","parameters":{"module":"CustomDimensions","action":"getCustomDimension","idDimension":"5","widget":1,"viewDataTable":"graphVerticalBar","columns":["nb_uniq_visitors"],"columns_to_display":["nb_uniq_visitors"],"rows":[],"rows_to_display":[]},"isHidden":false}]]}

As you can see it uses unique visitors which a user chose for example while selecting the day period. But then when switching to "Range" period for example, the widgets render an empty/broken widget and the whole UI is basically broken afterwards.

This is because there are rows for the data table, but there is no entry for the unique visitors (I think). Therefore there is no this.data[0].length in

index.php?module=Proxy&action=getCoreJs&cb=52c065e5d0f32ad90504d57b7b3f5e72:formatted:57479 Uncaught TypeError: Cannot read property 'length' of undefined
    at exports.JqplotBarGraphDataTable._setJqplotParameters (VM1264 index.php:formatted:1)
    at exports.JqplotBarGraphDataTable.init (VM1264 index.php:formatted:1)
    at exports.JqplotBarGraphDataTable.DataTable (VM1264 index.php:formatted:1)
    at exports.JqplotBarGraphDataTable.exports.JqplotGraphDataTable (VM1264 index.php:formatted:1)
    at new exports.JqplotBarGraphDataTable (VM1264 index.php:formatted:1)
    at HTMLDivElement.<anonymous> (VM1264 index.php:formatted:1)
    at Function.each (VM1264 index.php:formatted:1)
    at n.fn.init.each (VM1264 index.php:formatted:1)
    at Function.DataTable.initNewDataTables (VM1264 index.php:formatted:1)
    at HTMLDocument.eval (eval at globalEval (VM1264 index.php:formatted:1), <anonymous>:2:39)

There must be some code like here: https://github.com/matomo-org/matomo/blob/3.8.1/plugins/CoreVisualizations/JqplotDataGenerator/Evolution.php#L54-L58 that only adds data to the graph series when there is data for the specific metric.

When replacing all metrics with nb_visits, then the dashobard renders nicely. Used are pie and bar charts for example. Ideally we would show instead "no data" message or make the visualisations work with no data.

This is what the dashboard looks like:

image

@tsteur tsteur added the Bug For errors / faults / flaws / inconsistencies etc. label Jan 29, 2019
@tsteur tsteur added this to the 3.9.0 milestone Jan 29, 2019
@mattab mattab modified the milestones: 3.9.0, 3.10.0 Mar 18, 2019
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.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants