@AltamashShaikh opened this Issue on May 26th 2022 Contributor

CoreVisualizations - [Warning] Undefined index CoreVisualizations/Visualizations/Sparklines.php(292)

Expected Behavior

Should handle such undefined index in the code

Current Behavior

Just noticed this, when trying to debug a bug for other plugin there are too many warnings of undefined index in CoreVisualizations/Visualizations/Sparklines.php(292)

To reproduce the error, access Matomo dashboard and tail matomo.log - tail -f /var/www/html/work/matomo/tmp/logs/matomo.log | grep -i Warning
You will see following warning in the log file

Sample Error message

WARNING CoreVisualizations[2022-05-26 06:50:01 UTC] [d3452] /var/www/html/work/matomo/plugins/CoreVisualizations/Visualizations/Sparklines.php(292): Notice - Undefined index: nb_visits - Matomo 4.11.0-b1 - Please report this message in the Matomo forums: https://forum.matomo.org (please do a search first as it might have been reported already) <a href='/0'>#0</a>/plugins/CoreVisualizations/Visualizations/Sparklines.php(292),<a href='/1'>#1</a>/plugins/CoreVisualizations/Visualizations/Sparklines.php(108),<a href='/2'>#2</a>/core/Plugin/Report.php(320),<a href='/3'>#3</a>/plugins/CoreHome/Controller.php(60),[internal function]: Piwik\Plugins\CoreHome\Controller->renderReportWidget(),<a href='/5'>#5</a>/core/FrontController.php(631),<a href='/6'>#6</a>/core/FrontController.php(169),<a href='/7'>#7</a>/core/dispatch.php(32),<a href='/8'>#8</a>/index.php(25)
WARNING CoreVisualizations[2022-05-26 06:50:01 UTC] [d3452] /var/www/html/work/matomo/plugins/CoreVisualizations/Visualizations/Sparklines.php(292): Notice - Undefined index: nb_uniq_visitors - Matomo 4.11.0-b1 - Please report this message in the Matomo forums: https://forum.matomo.org (please do a search first as it might have been reported already) <a href='/0'>#0</a>/plugins/CoreVisualizations/Visualizations/Sparklines.php(292),<a href='/1'>#1</a>/plugins/CoreVisualizations/Visualizations/Sparklines.php(108),<a href='/2'>#2</a>/core/Plugin/Report.php(320),<a href='/3'>#3</a>/plugins/CoreHome/Controller.php(60),[internal function]: Piwik\Plugins\CoreHome\Controller->renderReportWidget(),<a href='/5'>#5</a>/core/FrontController.php(631),<a href='/6'>#6</a>/core/FrontController.php(169),<a href='/7'>#7</a>/core/dispatch.php(32),<a href='/8'>#8</a>/index.php(25)
WARNING CoreVisualizations[2022-05-26 06:50:01 UTC] [d3452] /var/www/html/work/matomo/plugins/CoreVisualizations/Visualizations/Sparklines.php(292): Notice - Undefined index: nb_pageviews - Matomo 4.11.0-b1 - Please report this message in the Matomo forums: https://forum.matomo.org (please do a search first as it might have been reported already) <a href='/0'>#0</a>/plugins/CoreVisualizations/Visualizations/Sparklines.php(292),<a href='/1'>#1</a>/plugins/CoreVisualizations/Visualizations/Sparklines.php(108),<a href='/2'>#2</a>/core/Plugin/Report.php(320),<a href='/3'>#3</a>/plugins/CoreHome/Controller.php(60),[internal function]: Piwik\Plugins\CoreHome\Controller->renderReportWidget(),<a href='/5'>#5</a>/core/FrontController.php(631),<a href='/6'>#6</a>/core/FrontController.php(169),<a href='/7'>#7</a>/core/dispatch.php(32),<a href='/8'>#8</a>/index.php(25)
WARNING CoreVisualizations[2022-05-26 06:50:01 UTC] [d3452] /var/www/html/work/matomo/plugins/CoreVisualizations/Visualizations/Sparklines.php(292): Notice - Undefined index: nb_uniq_pageviews - Matomo 4.11.0-b1 - Please report this message in the Matomo forums: https://forum.matomo.org (please do a search first as it might have been reported already) <a href='/0'>#0</a>/plugins/CoreVisualizations/Visualizations/Sparklines.php(292),<a href='/1'>#1</a>/plugins/CoreVisualizations/Visualizations/Sparklines.php(108),<a href='/2'>#2</a>/core/Plugin/Report.php(320),<a href='/3'>#3</a>/plugins/CoreHome/Controller.php(60),[internal function]: Piwik\Plugins\CoreHome\Controller->renderReportWidget(),<a href='/5'>#5</a>/core/FrontController.php(631),<a href='/6'>#6</a>/core/FrontController.php(169),<a href='/7'>#7</a>/core/dispatch.php(32),<a href='/8'>#8</a>/index.php(25)
WARNING CoreVisualizations[2022-05-26 06:50:01 UTC] [d3452] /var/www/html/work/matomo/plugins/CoreVisualizations/Visualizations/Sparklines.php(292): Notice - Undefined index: nb_users - Matomo 4.11.0-b1 - Please report this message in the Matomo forums: https://forum.matomo.org (please do a search first as it might have been reported already) <a href='/0'>#0</a>/plugins/CoreVisualizations/Visualizations/Sparklines.php(292),<a href='/1'>#1</a>/plugins/CoreVisualizations/Visualizations/Sparklines.php(108),<a href='/2'>#2</a>/core/Plugin/Report.php(320),<a href='/3'>#3</a>/plugins/CoreHome/Controller.php(60),[internal function]: Piwik\Plugins\CoreHome\Controller->renderReportWidget(),<a href='/5'>#5</a>/core/FrontController.php(631),<a href='/6'>#6</a>/core/FrontController.php(169),<a href='/7'>#7</a>/core/dispatch.php(32),<a href='/8'>#8</a>/index.php(25)
WARNING CoreVisualizations[2022-05-26 06:50:01 UTC] [d3452] /var/www/html/work/matomo/plugins/CoreVisualizations/Visualizations/Sparklines.php(292): Notice - Undefined index: nb_searches - Matomo 4.11.0-b1 - Please report this message in the Matomo forums: https://forum.matomo.org (please do a search first as it might have been reported already) <a href='/0'>#0</a>/plugins/CoreVisualizations/Visualizations/Sparklines.php(292),<a href='/1'>#1</a>/plugins/CoreVisualizations/Visualizations/Sparklines.php(108),<a href='/2'>#2</a>/core/Plugin/Report.php(320),<a href='/3'>#3</a>/plugins/CoreHome/Controller.php(60),[internal function]: Piwik\Plugins\CoreHome\Controller->renderReportWidget(),<a href='/5'>#5</a>/core/FrontController.php(631),<a href='/6'>#6</a>/core/FrontController.php(169),<a href='/7'>#7</a>/core/dispatch.php(32),<a href='/8'>#8</a>/index.php(25)
WARNING CoreVisualizations[2022-05-26 06:50:01 UTC] [d3452] /var/www/html/work/matomo/plugins/CoreVisualizations/Visualizations/Sparklines.php(292): Notice - Undefined index: nb_keywords - Matomo 4.11.0-b1 - Please report this message in the Matomo forums: https://forum.matomo.org (please do a search first as it might have been reported already) <a href='/0'>#0</a>/plugins/CoreVisualizations/Visualizations/Sparklines.php(292),<a href='/1'>#1</a>/plugins/CoreVisualizations/Visualizations/Sparklines.php(108),<a href='/2'>#2</a>/core/Plugin/Report.php(320),<a href='/3'>#3</a>/plugins/CoreHome/Controller.php(60),[internal function]: Piwik\Plugins\CoreHome\Controller->renderReportWidget(),<a href='/5'>#5</a>/core/FrontController.php(631),<a href='/6'>#6</a>/core/FrontController.php(169),<a href='/7'>#7</a>/core/dispatch.php(32),<a href='/8'>#8</a>/index.php(25)
WARNING CoreVisualizations[2022-05-26 06:50:01 UTC] [d3452] /var/www/html/work/matomo/plugins/CoreVisualizations/Visualizations/Sparklines.php(292): Notice - Undefined index: nb_downloads - Matomo 4.11.0-b1 - Please report this message in the Matomo forums: https://forum.matomo.org (please do a search first as it might have been reported already) <a href='/0'>#0</a>/plugins/CoreVisualizations/Visualizations/Sparklines.php(292),<a href='/1'>#1</a>/plugins/CoreVisualizations/Visualizations/Sparklines.php(108),<a href='/2'>#2</a>/core/Plugin/Report.php(320),<a href='/3'>#3</a>/plugins/CoreHome/Controller.php(60),[internal function]: Piwik\Plugins\CoreHome\Controller->renderReportWidget(),<a href='/5'>#5</a>/core/FrontController.php(631),<a href='/6'>#6</a>/core/FrontController.php(169),<a href='/7'>#7</a>/core/dispatch.php(32),<a href='/8'>#8</a>/index.php(25)
WARNING CoreVisualizations[2022-05-26 06:50:01 UTC] [d3452] /var/www/html/work/matomo/plugins/CoreVisualizations/Visualizations/Sparklines.php(292): Notice - Undefined index: nb_uniq_downloads - Matomo 4.11.0-b1 - Please report this message in the Matomo forums: https://forum.matomo.org (please do a search first as it might have been reported already) <a href='/0'>#0</a>/plugins/CoreVisualizations/Visualizations/Sparklines.php(292),<a href='/1'>#1</a>/plugins/CoreVisualizations/Visualizations/Sparklines.php(108),<a href='/2'>#2</a>/core/Plugin/Report.php(320),<a href='/3'>#3</a>/plugins/CoreHome/Controller.php(60),[internal function]: Piwik\Plugins\CoreHome\Controller->renderReportWidget(),<a href='/5'>#5</a>/core/FrontController.php(631),<a href='/6'>#6</a>/core/FrontController.php(169),<a href='/7'>#7</a>/core/dispatch.php(32),<a href='/8'>#8</a>/index.php(25)
WARNING CoreVisualizations[2022-05-26 06:50:01 UTC] [d3452] /var/www/html/work/matomo/plugins/CoreVisualizations/Visualizations/Sparklines.php(292): Notice - Undefined index: nb_outlinks - Matomo 4.11.0-b1 - Please report this message in the Matomo forums: https://forum.matomo.org (please do a search first as it might have been reported already) <a href='/0'>#0</a>/plugins/CoreVisualizations/Visualizations/Sparklines.php(292),<a href='/1'>#1</a>/plugins/CoreVisualizations/Visualizations/Sparklines.php(108),<a href='/2'>#2</a>/core/Plugin/Report.php(320),<a href='/3'>#3</a>/plugins/CoreHome/Controller.php(60),[internal function]: Piwik\Plugins\CoreHome\Controller->renderReportWidget(),<a href='/5'>#5</a>/core/FrontController.php(631),<a href='/6'>#6</a>/core/FrontController.php(169),<a href='/7'>#7</a>/core/dispatch.php(32),<a href='/8'>#8</a>/index.php(25)
WARNING CoreVisualizations[2022-05-26 06:50:01 UTC] [d3452] /var/www/html/work/matomo/plugins/CoreVisualizations/Visualizations/Sparklines.php(292): Notice - Undefined index: nb_uniq_outlinks - Matomo 4.11.0-b1 - Please report this message in the Matomo forums: https://forum.matomo.org (please do a search first as it might have been reported already) <a href='/0'>#0</a>/plugins/CoreVisualizations/Visualizations/Sparklines.php(292),<a href='/1'>#1</a>/plugins/CoreVisualizations/Visualizations/Sparklines.php(108),<a href='/2'>#2</a>/core/Plugin/Report.php(320),<a href='/3'>#3</a>/plugins/CoreHome/Controller.php(60),[internal function]: Piwik\Plugins\CoreHome\Controller->renderReportWidget(),<a href='/5'>#5</a>/core/FrontController.php(631),<a href='/6'>#6</a>/core/FrontController.php(169),<a href='/7'>#7</a>/core/dispatch.php(32),<a href='/8'>#8</a>/index.php(25)
WARNING CoreVisualizations[2022-05-26 06:50:01 UTC] [d3452] /var/www/html/work/matomo/plugins/CoreVisualizations/Visualizations/Sparklines.php(292): Notice - Undefined index: max_actions - Matomo 4.11.0-b1 - Please report this message in the Matomo forums: https://forum.matomo.org (please do a search first as it might have been reported already) <a href='/0'>#0</a>/plugins/CoreVisualizations/Visualizations/Sparklines.php(292),<a href='/1'>#1</a>/plugins/CoreVisualizations/Visualizations/Sparklines.php(108),<a href='/2'>#2</a>/core/Plugin/Report.php(320),<a href='/3'>#3</a>/plugins/CoreHome/Controller.php(60),[internal function]: Piwik\Plugins\CoreHome\Controller->renderReportWidget(),<a href='/5'>#5</a>/core/FrontController.php(631),<a href='/6'>#6</a>/core/FrontController.php(169),<a href='/7'>#7</a>/core/dispatch.php(32),<a href='/8'>#8</a>/index.php(25)

Screenshot from 2022-05-26 12-25-05

Possible Solution

Steps to Reproduce (for Bugs)

1.
2.

Context

Your Environment

  • Matomo Version:
  • PHP Version:
  • Server Operating System:
  • Additionally installed plugins:
  • Browser:
  • Operating System:
@bx80 commented on May 29th 2022 Contributor

This is a regression from #19057

@sgiehl commented on May 30th 2022 Member
This Issue was closed on May 31st 2022
Powered by GitHub Issue Mirror