Flagging plugin fatal error.
if you tern the plugin on in vanilla v2.2.1 & MySQL 5.7.12 it crashes the forum dashboard.
Fatal Error in PHP.trigger_error();
Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'aquaexotik0forum_vanilla.fl.ForeignID' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
The error occurred on or near:
/library/database/class.database.php
408: // If we get here then the pdo statement prepared properly. 409: break; 410: 411: } catch (Gdn_UserException $uex) { 412: trigger_error($uex->getMessage(), E_USER_ERROR); 413: } catch (Exception $ex) { 414: list($state, $code, $message) = $PDO->errorInfo(); 415: 416: // If the error code is consistent with a disconnect, attempt to retry
Backtrace:
/library/database/class.database.phpPHP::Gdn_ErrorHandler(); [/library/database/class.database.php:412] PHP::trigger_error(); [/library/database/class.sqldriver.php:1663] Gdn_Database->query(); [/library/database/class.sqldriver.php:614] Gdn_SQLDriver->query(); [/plugins/Flagging/class.flagging.plugin.php:34] Gdn_SQLDriver->get(); [/library/core/class.pluginmanager.php:867] FlaggingPlugin->base_getAppSettingsMenuItems_handler(); [/library/core/class.pluginmanager.php:780] Gdn_PluginManager->callEventHandler(); [/library/core/class.pluggable.php:133] Gdn_PluginManager->callEventHandlers(); [/applications/dashboard/modules/class.sidemenumodule.php:268] Gdn_Pluggable->fireEvent(); [/library/core/class.module.php:213] SideMenuModule->toString(); [/library/core/class.controller.php:1350] Gdn_Module->render(); [/applications/dashboard/views/admin.master.php:34] Gdn_Controller->renderAsset(); [/library/core/class.controller.php:1891] PHP::include(); [/library/core/class.controller.php:1318] Gdn_Controller->renderMaster(); [/library/core/class.pluggable.php:199] Gdn_Controller->xRender(); [/applications/dashboard/controllers/class.settingscontroller.php:719] Gdn_Pluggable->__call(); [/applications/dashboard/controllers/class.settingscontroller.php:719] SettingsController->render(); [/applications/dashboard/controllers/class.settingscontroller.php:719] SettingsController->plugins(); [/library/core/class.dispatcher.php:329] PHP::call_user_func_array(); [/index.php:44] Gdn_Dispatcher->dispatch();
Variables in local scope:
[Sql] 'select DISTINCT(fl.ForeignID) as
NumFlaggedItemsfrom GDN_Flag fl group by ForeignURL' [InputParameters] array ( ) [Options] array ( 'Type' => 'select', 'Slave' => NULL, 'ReturnType' => 'DataSet', ) [ReturnType] 'DataSet' [tries] 2 [try] 0 [PDO] array ( ) [PDOStatement] false [state] '42000' [code] 1055 [message] 'Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column \'aquaexotik0forum_vanilla.fl.ForeignID\' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by' [uex] array ( )
Comments
this is the core plugin im talking about can some one tern it on to see if it all so crashes your dashboard.
I suggest you run utility/structure
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
ok i just did this is what its giving me:
update GDN_Role
Role
set Type = 'applicant'
where RoleID = '4';
update GDN_Role
Role
set Type = 'member'
where RoleID = '8';
update GDN_Role
Role
set Type = 'unconfirmed'
where RoleID = '3';
update GDN_User
User
set Permissions = ''
where Permissions <> '';
so i clicked on run structure & data scripts but the plug in is still crashing the dashboard.
BTW this is a new vanilla install.
Based on this informative blog entry, it is because some default settings in MySql have changed: http://mysqlserverteam.com/mysql-5-7-only_full_group_by-improved-recognizing-functional-dependencies-enabled-by-default/
In phpMyAdmin run two sqls:
@sql_mode
The result is a list of sql modes including ONLY_FULL_GROUP_BY. Delete this from the list and run the following sql:
SET sql_mode = 'ListWithoutTheFullGroupMode'
This will help but is a workaround and not a solution. You should create an issue at github
thx for this info im just wandering in which part of github should i report it as in vanilla/addons/plugins/ i dont see the Flagging plugin folder ....
i opened a report about it on this page :
https://github.com/vanilla/addons/issues/332
That plug-in is in this repo: https://github.com/vanilla/vanilla/tree/master/plugins/Flagging
But that should be no problem.
i moved the issue to https://github.com/vanilla/vanilla/issues/3942
Thanks. These are pretty straighforward fixes typically if anyone else wants to get their hands dirty Otherwise we'll deal with it in a couple weeks for the next sprint.