Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
2.3.1 - Flagging plugin breaks Admin CP
Mayhem
New
So I recently installed Vanilla 2.3.1, installed a custom theme, and enabled a few plugins. One important plugin I'd like on the forums is Flagging, which for some odd reason, makes it impossible to use the Admin CP, so I disabled it through the config files. While it does break the Admin CP, the forums continue to work just fine.
Is there any quick fixes I can do to allow this plugin to be enabled and be able to use the Admin CP at the same time? If not, this thread will serve as a bug report.
0
Comments
Please tell us what "break Admin CP" means in detail: blank page, error message etc.
A blank page might be a signal for a PHP error. Check server error logs or (not if on production server!) change "show errors" to 1 in /index.php
The "Something went wrong" page will give you more detailed information when you add
$Configuration['Debug'] = TRUE;
to the /conf/config.phpThere are some themes which try to replace views and do it all wrong. It's always worth trying if the error persists while using the default theme.
Yes it was the something went wrong page, as you can see:
I'll try what you said and debug the situation, I'll edit the post if I can't handle it myself.
So I looked into it and I'm guessing it's something wrong with my database, and I have no idea how I should fix this issue in phpMyAdmin:
Fatal Error in PHP.trigger_error();
Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'databasenamehere.fl.ForeignID' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
( ! ) Gdn_UserException: Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column \'databasenamehere.fl.ForeignID\' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by in C:\wamp64\www\bb\library\database\class.database.php on line 404The error occurred on or near: C:\wamp64\www\bb\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:
C:\wamp64\www\bb\library\database\class.database.phpPHP::Gdn_ErrorHandler();
[C:\wamp64\www\bb\library\database\class.database.php:412] PHP::trigger_error();
[C:\wamp64\www\bb\library\database\class.sqldriver.php:1663] Gdn_Database->query();
[C:\wamp64\www\bb\library\database\class.sqldriver.php:614] Gdn_SQLDriver->query();
[C:\wamp64\www\bb\plugins\Flagging\class.flagging.plugin.php:34] Gdn_SQLDriver->get();
[C:\wamp64\www\bb\library\core\class.pluginmanager.php:873] FlaggingPlugin->base_getAppSettingsMenuItems_handler();
[C:\wamp64\www\bb\library\core\class.pluginmanager.php:786] Gdn_PluginManager->callEventHandler();
[C:\wamp64\www\bb\library\core\class.pluggable.php:133] Gdn_PluginManager->callEventHandlers();
[C:\wamp64\www\bb\applications\dashboard\modules\class.sidemenumodule.php:268] Gdn_Pluggable->fireEvent();
[C:\wamp64\www\bb\library\core\class.module.php:240] SideMenuModule->toString();
[C:\wamp64\www\bb\library\core\class.controller.php:1364] Gdn_Module->render();
[C:\wamp64\www\bb\applications\dashboard\views\admin.master.php:34] Gdn_Controller->renderAsset();
[C:\wamp64\www\bb\library\core\class.controller.php:1853] PHP::include();
[C:\wamp64\www\bb\library\core\class.controller.php:1314] Gdn_Controller->renderMaster();
[C:\wamp64\www\bb\library\core\class.pluggable.php:199] Gdn_Controller->xRender();
[C:\wamp64\www\bb\applications\dashboard\controllers\class.settingscontroller.php:1162] Gdn_Pluggable->__call();
[C:\wamp64\www\bb\applications\dashboard\controllers\class.settingscontroller.php:1162] SettingsController->render();
[C:\wamp64\www\bb\applications\dashboard\controllers\class.settingscontroller.php:1162] SettingsController->plugins();
[C:\wamp64\www\bb\library\core\class.dispatcher.php:326] PHP::call_user_func_array();
[C:\wamp64\www\bb\index.php:44] Gdn_Dispatcher->dispatch();
Variables in local scope:
[Sql] 'select DISTINCT(fl.ForeignID) as
NumFlaggedItems
from 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 \'databasenamehere.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 (
'xdebug_message' => '
Call Stack
#TimeMemoryFunctionLocation
10.0024248920{main}( )...\index.php:0
20.270110016584Gdn_Dispatcher->dispatch( )...\index.php:44
30.302912401184call_user_func_array:{C:\wamp64\www\bb\library\core\class.dispatcher.php:326}
( )...\class.dispatcher.php:326
40.302912402368SettingsController->plugins( )...\class.dispatcher.php:326
50.311412559128render
( )...\class.settingscontroller.php:1162
60.311412559800Gdn_Pluggable->__call( )...\class.settingscontroller.php:1162
70.351013518184Gdn_Controller->xRender( )...\class.pluggable.php:199
80.633914351456Gdn_Controller->renderMaster( )...\class.controller.php:1314
90.661214423448include( \'C:\wamp64\www\bb\applications\dashboard\views\admin.master.php\' )...\class.controller.php:1853
100.676714431944Gdn_Controller->renderAsset( )...\admin.master.php:34
110.677314431896Gdn_Module->render( )...\class.controller.php:1364
120.677314432320SideMenuModule->toString( )...\class.module.php:240
130.677314432544Gdn_Pluggable->fireEvent( )...\class.sidemenumodule.php:268
140.677314432592Gdn_PluginManager->callEventHandlers( )...\class.pluggable.php:133
150.677414432928Gdn_PluginManager->callEventHandler( )...\class.pluginmanager.php:786
160.684514499664FlaggingPlugin->base_getAppSettingsMenuItems_handler( )...\class.pluginmanager.php:873
170.684914501160Gdn_SQLDriver->get( )...\class.flagging.plugin.php:34
180.685114501648Gdn_SQLDriver->query( )...\class.sqldriver.php:614
190.685114502336Gdn_Database->query( )...\class.sqldriver.php:1663
',
)
The technical answer is that you have to disable then "ONLY_FULL_GROUP_BY" model of your database: https://dev.mysql.com/doc/refman/5.7/en/sql-mode.html#sqlmode_only_full_group_by
That could be done by running the query
SET sql_mode = '';
but after the database server is restarted, I guess you would face the same error again.Additionally you should change that in the mysql.ini. You might have to ask your hosting provider.
I did what you said but it didn't work, however what you said was pretty much right. PhpMyAdmin had been setting it by default, and once I figured that out, it works like a charm. Thanks for all of the help!