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.

Fatal Error in PHP.trigger_error();

edited July 2017 in Vanilla 2.0 - 2.8

Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'ufk-web.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: /var/www/ufkclan.com/public_html/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:

/var/www/ufkclan.com/public_html/library/database/class.database.phpPHP::Gdn_ErrorHandler();

[/var/www/ufkclan.com/public_html/library/database/class.database.php:412] PHP::trigger_error();

[/var/www/ufkclan.com/public_html/library/database/class.sqldriver.php:1663] Gdn_Database->query();

[/var/www/ufkclan.com/public_html/library/database/class.sqldriver.php:614] Gdn_SQLDriver->query();

[/var/www/ufkclan.com/public_html/plugins/Flagging/class.flagging.plugin.php:34] Gdn_SQLDriver->get();

[/var/www/ufkclan.com/public_html/library/core/class.pluginmanager.php:873] FlaggingPlugin->base_getAppSettingsMenuItems_handler();

[/var/www/ufkclan.com/public_html/library/core/class.pluginmanager.php:786] Gdn_PluginManager->callEventHandler();

[/var/www/ufkclan.com/public_html/library/core/class.pluggable.php:133] Gdn_PluginManager->callEventHandlers();

[/var/www/ufkclan.com/public_html/applications/dashboard/modules/class.sidemenumodule.php:268] Gdn_Pluggable->fireEvent();

[/var/www/ufkclan.com/public_html/library/core/class.module.php:240] SideMenuModule->toString();

[/var/www/ufkclan.com/public_html/library/core/class.controller.php:1364] Gdn_Module->render();

[/var/www/ufkclan.com/public_html/applications/dashboard/views/admin.master.php:34] Gdn_Controller->renderAsset();

[/var/www/ufkclan.com/public_html/library/core/class.controller.php:1853] PHP::include();

[/var/www/ufkclan.com/public_html/library/core/class.controller.php:1314] Gdn_Controller->renderMaster();

[/var/www/ufkclan.com/public_html/library/core/class.pluggable.php:199] Gdn_Controller->xRender();

[/var/www/ufkclan.com/public_html/applications/dashboard/controllers/class.settingscontroller.php:936] Gdn_Pluggable->__call();

[/var/www/ufkclan.com/public_html/library/core/class.dispatcher.php:326] SettingsController->xIndex();

[/var/www/ufkclan.com/public_html/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 \'ufk-web.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

  • R_JR_J Admin

    I guess you have to disable the "ONLY_FULL_GROUP_BY" sql mode.
    Run this SQL, if you do not know how to do it: SET sql_mode = '';

  • artur66artur66 New
    edited August 2017

    Same problem here SQL query didn't change anything
    The error occurred on or near: /home/ppunka77/public_html/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:

    /home/ppunka77/public_html/library/database/class.database.phpPHP::Gdn_ErrorHandler();

    [/home/ppunka77/public_html/library/database/class.database.php:412] PHP::trigger_error();

    [/home/ppunka77/public_html/library/database/class.sqldriver.php:1663] Gdn_Database->query();

    [/home/ppunka77/public_html/library/database/class.sqldriver.php:614] Gdn_SQLDriver->query();

    [/home/ppunka77/public_html/applications/gallery/modules/class.tagcloudmodule.php:26] Gdn_SQLDriver->get();

    [/home/ppunka77/public_html/applications/gallery/modules/class.tagcloudmodule.php:32] TagCloudModule->getData();

    [/home/ppunka77/public_html/library/core/class.module.php:213] TagCloudModule->toString();

    [/home/ppunka77/public_html/library/core/class.modulecollection.php:45] Gdn_Module->render();

    [/home/ppunka77/public_html/library/core/class.modulecollection.php:69] Gdn_ModuleCollection->render();

    [/home/ppunka77/public_html/library/vendors/SmartyPlugins/function.asset.php:46] Gdn_ModuleCollection->toString();

    [/home/ppunka77/public_html/cache/Smarty/compile/vanilla^%%12^126^1262EA03%%default.master.tpl.php:57] PHP::smarty_function_asset();

    [/home/ppunka77/public_html/library/vendors/Smarty-2.6.25/libs/Smarty.class.php:1276] PHP::include();

    [/home/ppunka77/public_html/library/vendors/Smarty-2.6.25/libs/Smarty.class.php:1126] Smarty->fetch();

    [/home/ppunka77/public_html/library/core/class.smarty.php:144] Smarty->display();

    [/home/ppunka77/public_html/library/core/class.controller.php:1895] Gdn_Smarty->render();

    [/home/ppunka77/public_html/library/core/class.controller.php:1320] Gdn_Controller->renderMaster();

    [/home/ppunka77/public_html/library/core/class.pluggable.php:199] Gdn_Controller->xRender();

    [/home/ppunka77/public_html/applications/gallery/controllers/class.gallerycontroller.php:44] Gdn_Pluggable->__call();

    [/home/ppunka77/public_html/applications/gallery/controllers/class.gallerycontroller.php:44] GalleryController->render();

    [/home/ppunka77/public_html/applications/gallery/controllers/class.gallerycontroller.php:44] GalleryController->tagged();

    [/home/ppunka77/public_html/library/core/class.dispatcher.php:329] PHP::call_user_func_array();

    [/home/ppunka77/public_html/index.php:45] Gdn_Dispatcher->dispatch();

    Variables in local scope:

    [Sql] 'select v.*
    from GDN_TagStats v
    order by Galleries desc
    limit 10'

    [InputParameters] array (
    )

    [Options] array (
    'Type' => 'select',
    'Slave' => NULL,
    'ReturnType' => 'DataSet',
    )

    [ReturnType] 'DataSet'

    [tries] 2

    [try] 0

    [PDO] array (
    )

    [PDOStatement] false

    [state] 'HY000'

    [code] 1615

    [message] 'Prepared statement needs to be re-prepared'

    [uex] array (
    )

    Need Help?

    If you are a user of this website, you can report this message to a website administrator.

    If you are an administrator of this website, you can get help at the Vanilla Community Forums.
    Additional information for support personnel:

    Application: Vanilla
    Application Version: 2.2.1
    PHP Version: 5.5.38
    Operating System: Linux
    Server Software: Apache
    
  • Seems you deleted some files that are necessary...

  • No, your problem is totally different to the original question.

    You are using an application called "gallery" which provides a module called "tagcloudmodule" and the database query which causes the problem is

    select v.*
    from GDN_TagStats v
    order by Galleries desc
    limit 10
    

    It's hard to tell what's happening. And I don't understand "SQL query didn't change anything"

Sign In or Register to comment.