Project

General

Profile

Anomalie #1219

Erreur MySQL quand on se rend dans le menu Graphique

Added by Florent Fayolle 6 months ago. Updated 2 months ago.

Status:
Nouveau
Priority:
Bas
Assignee:
-
Category:
Base de données
Target version:
-
Start date:
12/07/2018
Due date:
% Done:

0%

Estimated time:
Version utilisée:
Vote:

Description

En utilisant MySQL (Oracle, pas mariadb), et en se rendant dans le menu Graphique, nous obtenons l'erreur suivante :

Message: SQLSTATE[42000]: Syntax error or access violation: 1055 Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'galette.galette_cotisations.date_enreg' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
File: /var/www/galette/galette/vendor/zendframework/zend-db/src/Adapter/Driver/Pdo/Connection.php
Line: 379
Trace: #0 /var/www/galette/galette/vendor/zendframework/zend-db/src/Adapter/Driver/Pdo/Connection.php(379): PDO->query('SELECT date_for...')
#1 /var/www/galette/galette/vendor/zendframework/zend-db/src/Adapter/Adapter.php(205): Zend\Db\Adapter\Driver\Pdo\Connection->execute('SELECT date_for...')
#2 /var/www/galette/galette/lib/Galette/Core/Db.php(777): Zend\Db\Adapter\Adapter->query('SELECT date_for...', 'execute')
#3 /var/www/galette/galette/lib/Galette/IO/Charts.php(374): Galette\Core\Db->execute(Object(Zend\Db\Sql\Select))
#4 /var/www/galette/galette/lib/Galette/IO/Charts.php(101): Galette\IO\Charts->getChartContribsAllTime()
#5 /var/www/galette/galette/lib/Galette/IO/Charts.php(89): Galette\IO\Charts->load()
#6 /var/www/galette/galette/includes/routes/management.routes.php(634): Galette\IO\Charts->__construct(Array)
#7 [internal function]: Closure->{closure}(Object(Slim\Http\Request), Object(Slim\Http\Response), Array)
#8 /var/www/galette/galette/vendor/slim/slim/Slim/Handlers/Strategies/RequestResponse.php(41): call_user_func(Object(Closure), Object(Slim\Http\Request), Object(Slim\Http\Response), Array)
#9 /var/www/galette/galette/vendor/slim/slim/Slim/Route.php(335): Slim\Handlers\Strategies\RequestResponse->__invoke(Object(Closure), Object(Slim\Http\Request), Object(Slim\Http\Response), Array)
#10 /var/www/galette/galette/includes/main.inc.php(236): Slim\Route->__invoke(Object(Slim\Http\Request), Object(Slim\Http\Response))
#11 [internal function]: Closure->{closure}(Object(Slim\Http\Request), Object(Slim\Http\Response), Object(Slim\Route))
#12 /var/www/galette/galette/vendor/slim/slim/Slim/DeferredCallable.php(43): call_user_func_array(Object(Closure), Array)
#13 [internal function]: Slim\DeferredCallable->__invoke(Object(Slim\Http\Request), Object(Slim\Http\Response), Object(Slim\Route))
#14 /var/www/galette/galette/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(70): call_user_func(Object(Slim\DeferredCallable), Object(Slim\Http\Request), Object(Slim\Http\Response), Object(Slim\Route))
#15 /var/www/galette/galette/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(117): Slim\Route->Slim\{closure}(Object(Slim\Http\Request), Object(Slim\Http\Response))
#16 /var/www/galette/galette/vendor/slim/slim/Slim/Route.php(313): Slim\Route->callMiddlewareStack(Object(Slim\Http\Request), Object(Slim\Http\Response))
#17 /var/www/galette/galette/vendor/slim/slim/Slim/App.php(495): Slim\Route->run(Object(Slim\Http\Request), Object(Slim\Http\Response))
#18 /var/www/galette/galette/vendor/akrabat/rka-slim-session-middleware/RKA/SessionMiddleware.php(47): Slim\App->__invoke(Object(Slim\Http\Request), Object(Slim\Http\Response))
#19 [internal function]: RKA\SessionMiddleware->__invoke(Object(Slim\Http\Request), Object(Slim\Http\Response), Object(Slim\App))
#20 /var/www/galette/galette/vendor/slim/slim/Slim/DeferredCallable.php(43): call_user_func_array(Object(RKA\SessionMiddleware), Array)
#21 [internal function]: Slim\DeferredCallable->__invoke(Object(Slim\Http\Request), Object(Slim\Http\Response), Object(Slim\App))
#22 /var/www/galette/galette/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(70): call_user_func(Object(Slim\DeferredCallable), Object(Slim\Http\Request), Object(Slim\Http\Response), Object(Slim\App))
#23 /var/www/galette/galette/includes/main.inc.php(370): Slim\App->Slim\{closure}(Object(Slim\Http\Request), Object(Slim\Http\Response))
#24 [internal function]: Closure->{closure}(Object(Slim\Http\Request), Object(Slim\Http\Response), Object(Closure))
#25 /var/www/galette/galette/vendor/slim/slim/Slim/DeferredCallable.php(43): call_user_func_array(Object(Closure), Array)
#26 [internal function]: Slim\DeferredCallable->__invoke(Object(Slim\Http\Request), Object(Slim\Http\Response), Object(Closure))
#27 /var/www/galette/galette/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(70): call_user_func(Object(Slim\DeferredCallable), Object(Slim\Http\Request), Object(Slim\Http\Response), Object(Closure))
#28 /var/www/galette/galette/includes/main.inc.php(395): Slim\App->Slim\{closure}(Object(Slim\Http\Request), Object(Slim\Http\Response))
#29 [internal function]: Closure->{closure}(Object(Slim\Http\Request), Object(Slim\Http\Response), Object(Closure))
#30 /var/www/galette/galette/vendor/slim/slim/Slim/DeferredCallable.php(43): call_user_func_array(Object(Closure), Array)
#31 [internal function]: Slim\DeferredCallable->__invoke(Object(Slim\Http\Request), Object(Slim\Http\Response), Object(Closure))
#32 /var/www/galette/galette/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(70): call_user_func(Object(Slim\DeferredCallable), Object(Slim\Http\Request), Object(Slim\Http\Response), Object(Closure))
#33 /var/www/galette/galette/includes/main.inc.php(452): Slim\App->Slim\{closure}(Object(Slim\Http\Request), Object(Slim\Http\Response))
#34 [internal function]: Closure->{closure}(Object(Slim\Http\Request), Object(Slim\Http\Response), Object(Closure))
#35 /var/www/galette/galette/vendor/slim/slim/Slim/DeferredCallable.php(43): call_user_func_array(Object(Closure), Array)
#36 [internal function]: Slim\DeferredCallable->__invoke(Object(Slim\Http\Request), Object(Slim\Http\Response), Object(Closure))
#37 /var/www/galette/galette/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(70): call_user_func(Object(Slim\DeferredCallable), Object(Slim\Http\Request), Object(Slim\Http\Response), Object(Closure))
#38 /var/www/galette/galette/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(117): Slim\App->Slim\{closure}(Object(Slim\Http\Request), Object(Slim\Http\Response))
#39 /var/www/galette/galette/vendor/slim/slim/Slim/App.php(388): Slim\App->callMiddlewareStack(Object(Slim\Http\Request), Object(Slim\Http\Response))
#40 /var/www/galette/galette/vendor/slim/slim/Slim/App.php(296): Slim\App->process(Object(Slim\Http\Request), Object(Slim\Http\Response))
#41 /var/www/galette/galette/includes/main.inc.php(465): Slim\App->run()
#42 /var/www/galette/galette/webroot/index.php(44): require_once('/var/www/galett...')

NB : je doute que notre asso (l'ALDIL) en ait réellement besoin. Le ticket est juste pour tracer l'incident :).


Files

snip_20190416102835.png (41.2 KB) snip_20190416102835.png tri par statut Alain Paris, 04/16/2019 10:31 AM

History

#1

Updated by Johan Cwiklinski 6 months ago

  • Status changed from Nouveau to Commentaire

De quelle version de MySQL s'agit-il ? (puis bon franchement, vous pourriez utiliser mariadb ou postgreql quand même à l'ALDIL :p).

De mémoire, en 5.7, ils avaient ajouté une configuration qui a ensuite été retirée... MySQL n'a jamais été restrictif, au contraire de PostgreSQL. Pour ce dernier, ce type d'erreur peut effectivement arriver, mais pour le coup, je ne le reproduit pas.

#2

Updated by Florent Fayolle 6 months ago

Notre version :

mysqld  Ver 5.7.24-0ubuntu0.18.04.1 for Linux on x86_64 ((Ubuntu))

(puis bon franchement, vous pourriez utiliser mariadb ou postgreql quand même à l'ALDIL :p).

Pataper !

#3

Updated by Johan Cwiklinski 5 months ago

  • Category set to Base de données
  • Status changed from Commentaire to Nouveau
  • Priority changed from Normal to Bas
#4

Updated by Alain Paris 2 months ago

Bonjour,

Le mode sql_mod only_full_group_by (par défaut depuis MySQL 5.7.5) provoque l'erreur sur "Graphiques" mais également un problème sur la page "members" lors du tri par statut (galette/webroot/members/order/2):

Aucun membre n’a été trouvé.
Les largeurs de colonnes sont modifiées.
Pas de message d'erreur.

Les autres possibilités de tri fonctionnent correctement sur la page "members".

Also available in: Atom PDF