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.
Options

Edit roles issue

Hey

When I try to edit roles, this is shown when debug mode is enabled.

Fatal Error in PHP.gdn_ErrorHandler();
You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ' p.Name as Name from GDN_c c left join GDN_p p on c. = p.ID' at line 1
The error occurred on or near: /home/sites/3b/0/0e720f022a/public_html/library/database/class.database.php
403: // If we get here then the pdo statement prepared properly.
404: break;
405:
406: } catch (Gdn_UserException $uex) {
407: trigger_error($uex->getMessage(), E_USER_ERROR);
408: } catch (Exception $ex) {
409: list($state, $code, $message) = $pDO->errorInfo();
410:
411: // If the error code is consistent with a disconnect, attempt to retry
Backtrace:
/home/sites/3b/0/0e720f022a/public_html/library/database/class.database.phpPHP::gdn_ErrorHandler();
[/home/sites/3b/0/0e720f022a/public_html/library/database/class.database.php:407] PHP::trigger_error();
[/home/sites/3b/0/0e720f022a/public_html/library/database/class.sqldriver.php:1684] Gdn_Database->query();
[/home/sites/3b/0/0e720f022a/public_html/library/database/class.sqldriver.php:629] Gdn_SQLDriver->query();
[/home/sites/3b/0/0e720f022a/public_html/applications/dashboard/models/class.permissionmodel.php:595] Gdn_SQLDriver->get();
[/home/sites/3b/0/0e720f022a/public_html/applications/dashboard/models/class.permissionmodel.php:731] PermissionModel->getJunctionPermissions();
[/home/sites/3b/0/0e720f022a/public_html/applications/dashboard/models/class.permissionmodel.php:781] PermissionModel->getPermissions();
[/home/sites/3b/0/0e720f022a/public_html/applications/dashboard/controllers/class.rolecontroller.php:153] PermissionModel->getPermissionsEdit();
[/home/sites/3b/0/0e720f022a/public_html/library/core/class.dispatcher.php:833] RoleController->edit();
[/home/sites/3b/0/0e720f022a/public_html/library/core/class.dispatcher.php:262] Gdn_Dispatcher->dispatchController();
[/home/sites/3b/0/0e720f022a/public_html/index.php:29] Gdn_Dispatcher->dispatch();
Variables in local scope:
[sql] 'select distinct p.ID as ID, c., p.Name as Name
from GDN_c c
left join GDN_p p on c. = p.ID'
[inputParameters] array (
)
[options] array (
'Type' => 'select',
'Slave' => NULL,
'ReturnType' => 'DataSet',
)
[returnType] 'DataSet'
[tries] 2
[try] 0
[pDO] array (
)
[pDOStatement] false
[state] '42000'
[code] 1064
[message] 'You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near \' p.Name as Name
from GDN_c c
left join GDN_p p on c. = p.ID\' at line 1'
[uex] array (
)

Comments

  • Options

    what sql-mode are you using?

    https://mariadb.com/kb/en/library/sql-mode/

    Pragmatism is all I have to offer. Avoiding the sidelines and providing centerline pro-tips.

  • Options
    GermontGermont New
    edited April 2018

    He had an error for registration "No default role" blah blah
    Then added a line in config.php to solve the problem, but got this error.

    $Configuration['Garden']['Registration']['DefaultRoles'] = '3';

    He asked for help so the only thing I did, was to remove this line, and change the default for "Member" role.

Sign In or Register to comment.