MineWebCMS icon indicating copy to clipboard operation
MineWebCMS copied to clipboard

[BUG] Le graphique représentant le nombre de visiteurs ne s'affiche pas

Open plagoutte opened this issue 5 years ago • 1 comments

Describe the bug | Décrivez le bug

Sur le panel admin, section Général -> Statistiques. RAS sur les deux blocs " Sites référents" et "Pages les plus visitées", en revanche, le bloc "Visiteurs" est vide.

To Reproduce | Pour reproduire le bug

Se rendre dans Général -> Statistiques.

Expected behavior | Ce qui aurait dû se passer

Le graphique représentant le nombre de visiteurs aurait dû s'afficher.

Screenshots

image

MineWeb (please complete the following information):

  • OS : Ubuntu 18.04

  • Browser you use to access to MineWeb : Firefox

  • Version : 1.10.1

  • Web server : Apache 2.4.29

  • PHP 7.3.18

  • MySQL 8.0.20

  • Path to logs (upload the content off /app/tmp/logs/error.log to https://hastebin.com/ and give us the link you get | Mettez en ligne sur https://hastebin.com/ le contenu du fichier /app/tmp/logs/error.log et donnez nous le lien qui en résulte):

2020-05-24 20:50:06 Error: [PDOException] SQLSTATE[42000]: Syntax error or access violation: 1055 Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column 'mineweb.Visit.id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
Request URL: /admin/statistics/get_visits
Stack Trace:
#0 /var/www/html/lib/Cake/Model/Datasource/DboSource.php(502): PDOStatement->execute(Array)
#1 /var/www/html/lib/Cake/Model/Datasource/DboSource.php(468): DboSource->_execute('SELECT DATE(cre...', Array)
#2 /var/www/html/lib/Cake/Model/Datasource/DboSource.php(715): DboSource->execute('SELECT DATE(cre...', Array, Array)
#3 /var/www/html/lib/Cake/Model/Datasource/DboSource.php(1226): DboSource->fetchAll('SELECT DATE(cre...', Array)
#4 /var/www/html/lib/Cake/Model/Model.php(3053): DboSource->read(Object(Visit), Array)
#5 /var/www/html/lib/Cake/Model/Model.php(3025): Model->_readDataSource('all', Array)
#6 /var/www/html/app/Model/Visit.php(17): Model->find('all', Array)
#7 /var/www/html/app/Controller/StatisticsController.php(31): Visit->getVisitRange(15)
#8 [internal function]: StatisticsController->admin_get_visits()
#9 /var/www/html/lib/Cake/Controller/Controller.php(499): ReflectionMethod->invokeArgs(Object(StatisticsController), Array)
#10 /var/www/html/lib/Cake/Routing/Dispatcher.php(193): Controller->invokeAction(Object(CakeRequest))
#11 /var/www/html/lib/Cake/Routing/Dispatcher.php(167): Dispatcher->_invoke(Object(StatisticsController), Object(CakeRequest))
#12 /var/www/html/app/webroot/index.php(114): Dispatcher->dispatch(Object(CakeRequest), Object(CakeResponse))
#13 {main}

Additional context | Remarques

Le graphique s'affichait il y a très longtemps de mémoire (en 2018, date d'installation du CMS).

plagoutte avatar May 24 '20 18:05 plagoutte

C'est dû à une version de MySQL récente, faudrait en effet qu'on rajoute id dans les champs sélectionnés quand on fait la query SQL.

Eywek avatar Dec 23 '20 19:12 Eywek