Fatal Error! Is it me or is it InThisDiscussion plugin crashing down the whole site?
This error completely trashes my site :(
Anybody with a clue? I suspect database misconfig
Fatal Error in PHP.gdn_ErrorHandler(); Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column 'my_database.c.DateInserted' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by Backtrace: /home/user/public_html/library/database/class.database.phpPHP::gdn_ErrorHandler(); [/home/user/public_html/library/database/class.database.php:421] PHP::trigger_error(); [/home/user/public_html/library/database/class.sqldriver.php:1707] Gdn_Database->query(); [/home/user/public_html/library/database/class.sqldriver.php:664] Gdn_SQLDriver->query(); [/home/user/public_html/plugins/VanillaInThisDiscussion/class.inthisdiscussionmodule.php:46] Gdn_SQLDriver->get(); [/home/user/public_html/plugins/VanillaInThisDiscussion/default.php:49] InThisDiscussionModule->getData(); [/home/user/public_html/plugins/VanillaInThisDiscussion/default.php:49] VanillaInThisDiscussionPlugin->discussionController_beforeDiscussionRender_handler(); [/home/user/public_html/library/Garden/EventManager.php:278] PHP::call_user_func_array(); [/home/user/public_html/library/core/class.pluginmanager.php:807] Garden\EventManager->fire(); [/home/user/public_html/library/core/class.pluginmanager.php:765] Gdn_PluginManager->callEventHandler(); [/home/user/public_html/library/core/class.pluggable.php:131] Gdn_PluginManager->callEventHandlers(); [/home/user/public_html/applications/vanilla/controllers/class.discussioncontroller.php:267] Gdn_Pluggable->fireEvent(); [/home/user/public_html/library/core/class.dispatcher.php:862] DiscussionController->index(); [/home/user/public_html/library/core/class.dispatcher.php:279] Gdn_Dispatcher->dispatchController(); [/home/user/public_html/index.php:29] Gdn_Dispatcher->dispatch(); Variables in local scope: [sql] 'select u.UserID as `UserID`, u.Name as `Name`, u.Photo as `Photo`, max(c.DateInserted) as `DateLastActive` from `GDN_User` `u` join `GDN_Comment` `c` on u.UserID = c.InsertUserID where `c`.`DiscussionID` = :cDiscussionID group by `u`.`UserID`, `u`.`Name`, `u`.`Photo` order by `c`.`DateInserted` desc limit 20' [inputParameters] array ( ':cDiscussionID' => 1, ) [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 ORDER BY clause is not in GROUP BY clause and contains nonaggregated column \'my_databse.c.DateInserted\' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by' [ex] array ( )
0
Comments
https://github.com/vanilla/vanilla/commit/b908ce8e1f1977914bb7b943ee6337a7aad101f6
We’ve been slowly working towards using stricter SQL modes. With such a wide base of plugins it tends to go one at a time though, especially ones like this that are not used very much internally.
@pioc34 thank you very much for your contribution.
@donshakespeare our installation documentation still recommends disabling strict mode due to issues like this though Which I see you’ve done the partially.
@charrondev it’s a small contribution. It’s fun to let us build communities with your open source forum! If i can help, i do it.
@R_J that solved the issue indeed. Cheers!
@pioc34 I tried that but it only repeated the initial author of the discussion
i just shared the fix for the fatal error...