Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error inserting updated server group information to database when modifying user #3

Closed
HooTsBrooklyn opened this issue Jul 4, 2013 · 1 comment

Comments

@HooTsBrooklyn
Copy link

CDbCommand failed to execute the SQL statement: SQLSTATE[HY000]: General error: 1364 Field 'inherit_order' doesn't have a default value. The SQL statement executed was: INSERT INTO sb_admins_server_groups (admin_id, group_id) VALUES (:yp0, :yp1)

http://hootsclan.com/admin_server_group.html

Steps that I took to get this error:

  1. I created the default owner user
  2. I created the server group 'Root Admin" with z flag
  3. Modified user to add to 'Root Admin' server group
  4. Clicked 'Save'

That is when the error occurred.

In PHPMyAdmin, I modified the table to set the field 'inherit_order' to have a default value of 'NULL' and tried to save the user modifications and it worked.

This did allow the changes to be saved, however, the table shows the field 'inherit_order' to be set as NULL for the user.

Added a second user to verify and both users show as NULL as expected
PHPMyAdmin screenshot of 'sb_admins_server_groups'

EDIT:
Users DO NOT have access to !admin or sm_admin

L 07/04/2013 - 12:58:09: [sb_admins.smx] SQL error receiving admin: Unknown column 'ad.lastvisit' in 'where clause'
L 07/04/2013 - 12:58:09: [sb_admins.smx] Query dump: SELECT ad.id, ad.name, ad.auth, ad.identity, ad.server_password, COUNT(ag.group_id) FROM {{admins}} AS ad LEFT JOIN {{admins_server_groups}} AS ag ON ag.admin_id = ad.id LEFT JOIN {{servers_server_groups}} AS gs ON gs.group_id = ag.group_id WHERE ((ad.auth = 'steam' AND ad.identity REGEXP '^STEAM_[0-9]:1:615883$') OR (ad.auth = 'ip' AND '169.254.201.57' REGEXP REPLACE(REPLACE(ad.identity, '.', '.') , '.0', '..{1,3}')) OR (ad.auth = 'name' AND ad.identity = 'Brooklyn ๏̯͡๏ ßþ')) AND gs.server_id = 3 AND ad.lastvisit IS NOT NULL GROUP BY ad.id

Verified that 'Root Admin' was selected under 'Server Groups' in 'sourcemod_install/index.php/servers/edit/0' as well as RCON password is set

Admin information WAS NOT written to the server cstirke/sourcemod/configs/admins.cfg file

@ErikMinekus
Copy link
Member

I guess I should run MySQL in strict mode to catch those errors. This should fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants