WhatCD/Gazelle

Database missing permission sets causes SQL error in staff.php

Closed this issue · 9 comments

The current gazelle.sql included in the download is missing some of the default permission sets. Including the moderator permission set which seems to be required in order to get the staff.php page to work. If you install Gazelle with the current gazelle.sql you will end up with an SQL error on the staff page because the moderator permission set is missing.

That's true, I'm having the same problem. How do I fix this?

Run the following SQL statement:

INSERT INTO permissions (ID, Level, Name, `Values`, DisplayStaff) VALUES (11, 900, 'Moderator', 'a:100:{s:10:\"site_leech\";i:1;s:11:\"site_upload\";i:1;s:9:\"site_vote\";i:1;s:20:\"site_submit_requests\";i:1;s:21:\"site_see_old_requests\";i:1;s:20:\"site_advanced_search\";i:1;s:10:\"site_top10\";i:1;s:19:\"site_advanced_top10\";i:1;s:16:\"site_album_votes\";i:1;s:20:\"site_torrents_notify\";i:1;s:20:\"site_collages_create\";i:1;s:20:\"site_collages_manage\";i:1;s:20:\"site_collages_delete\";i:1;s:23:\"site_collages_subscribe\";i:1;s:22:\"site_collages_personal\";i:1;s:28:\"site_collages_renamepersonal\";i:1;s:19:\"site_make_bookmarks\";i:1;s:14:\"site_edit_wiki\";i:1;s:22:\"site_can_invite_always\";i:1;s:27:\"site_send_unlimited_invites\";i:1;s:22:\"site_moderate_requests\";i:1;s:18:\"site_delete_artist\";i:1;s:20:\"site_moderate_forums\";i:1;s:17:\"site_admin_forums\";i:1;s:23:\"site_forums_double_post\";i:1;s:14:\"site_view_flow\";i:1;s:18:\"site_view_full_log\";i:1;s:28:\"site_view_torrent_snatchlist\";i:1;s:18:\"site_recommend_own\";i:1;s:27:\"site_manage_recommendations\";i:1;s:15:\"site_delete_tag\";i:1;s:23:\"site_disable_ip_history\";i:1;s:14:\"zip_downloader\";i:1;s:10:\"site_debug\";i:1;s:17:\"site_proxy_images\";i:1;s:16:\"site_search_many\";i:1;s:20:\"users_edit_usernames\";i:1;s:16:\"users_edit_ratio\";i:1;s:20:\"users_edit_own_ratio\";i:1;s:17:\"users_edit_titles\";i:1;s:18:\"users_edit_avatars\";i:1;s:18:\"users_edit_invites\";i:1;s:22:\"users_edit_watch_hours\";i:1;s:21:\"users_edit_reset_keys\";i:1;s:19:\"users_edit_profiles\";i:1;s:18:\"users_view_friends\";i:1;s:20:\"users_reset_own_keys\";i:1;s:19:\"users_edit_password\";i:1;s:19:\"users_promote_below\";i:1;s:16:\"users_promote_to\";i:1;s:16:\"users_give_donor\";i:1;s:10:\"users_warn\";i:1;s:19:\"users_disable_users\";i:1;s:19:\"users_disable_posts\";i:1;s:17:\"users_disable_any\";i:1;s:18:\"users_delete_users\";i:1;s:18:\"users_view_invites\";i:1;s:20:\"users_view_seedleech\";i:1;s:19:\"users_view_uploaded\";i:1;s:15:\"users_view_keys\";i:1;s:14:\"users_view_ips\";i:1;s:16:\"users_view_email\";i:1;s:23:\"users_override_paranoia\";i:1;s:12:\"users_logout\";i:1;s:20:\"users_make_invisible\";i:1;s:9:\"users_mod\";i:1;s:13:\"torrents_edit\";i:1;s:15:\"torrents_delete\";i:1;s:20:\"torrents_delete_fast\";i:1;s:18:\"torrents_freeleech\";i:1;s:20:\"torrents_search_fast\";i:1;s:17:\"torrents_hide_dnu\";i:1;s:19:\"torrents_fix_ghosts\";i:1;s:17:\"admin_manage_news\";i:1;s:17:\"admin_manage_blog\";i:1;s:18:\"admin_manage_polls\";i:1;s:19:\"admin_manage_forums\";i:1;s:16:\"admin_manage_fls\";i:1;s:13:\"admin_reports\";i:1;s:26:\"admin_advanced_user_search\";i:1;s:18:\"admin_create_users\";i:1;s:15:\"admin_donor_log\";i:1;s:19:\"admin_manage_ipbans\";i:1;s:9:\"admin_dnu\";i:1;s:17:\"admin_clear_cache\";i:1;s:15:\"admin_whitelist\";i:1;s:24:\"admin_manage_permissions\";i:1;s:14:\"admin_schedule\";i:1;s:17:\"admin_login_watch\";i:1;s:17:\"admin_manage_wiki\";i:1;s:18:\"admin_update_geoip\";i:1;s:21:\"site_collages_recover\";i:1;s:19:\"torrents_add_artist\";i:1;s:13:\"edit_unknowns\";i:1;s:19:\"forums_polls_create\";i:1;s:21:\"forums_polls_moderate\";i:1;s:12:\"project_team\";i:1;s:25:\"torrents_edit_vanityhouse\";i:1;s:23:\"artist_edit_vanityhouse\";i:1;s:21:\"site_tag_aliases_read\";i:1;}', '1')

Then go to the toolbox > permissions manager and edit the moderator permission to whatever you think they should be. The above insert is copied from the sysop permissions set so if you don't change the perms the moderator permissions will be the same as sysop.

Still get an error

MySQL: Invalid Query:
SELECT
m.ID,
p.Level,

        m.Username,
        m.Paranoia,
        m.LastAccess,
        i.SupportFor
    FROM users_main AS m
        JOIN users_info AS i ON m.ID = i.UserID
        JOIN permissions AS p ON p.ID = m.PermissionID
    WHERE p.DisplayStaff = '1'
        AND p.Level <
    ORDER BY p.Level, m.LastAccess ASC SQL error: 1064 (You have an

error in your SQL syntax; check the manual that corresponds to your
MySQL server version for the right syntax to use near 'ORDER BY
p.Level, m.LastAccess ASC' at line 14)

On Tue, Jan 28, 2014 at 2:42 PM, derekisbusy notifications@github.comwrote:

Run the following SQL statement:

INSERT INTO permissions (ID, Level, Name, Values, DisplayStaff) VALUES (11, 900, 'Moderator', 'a:100:{s:10:"site_leech";i:1;s:11:"site_upload";i:1;s:9:"site_vote";i:1;s:20:"site_submit_requests";i:1;s:21:"site_see_old_requests";i:1;s:20:"site_advanced_search";i:1;s:10:"site_top10";i:1;s:19:"site_advanced_top10";i:1;s:16:"site_album_votes";i:1;s:20:"site_torrents_notify";i:1;s:20:"site_collages_create";i:1;s:20:"site_collages_manage";i:1;s:20:"site_collages_delete";i:1;s:23:"site_collages_subscribe";i:1;s:22:"site_collages_personal";i:1;s:28:"site_collages_renamepersonal";i:1;s:19:"site_make_bookmarks";i:1;s:14:"site_edit_wiki";i:1;s:22:"site_can_invite_always";i:1;s:27:"site_send_unlimited_invites";i:1;s:22:"site_moderate_requests";i:1;s:18:"site_delete_artist";i:1;s:20:"site_moderate_forums";i:1;s:17:"site_admin_forums";i:1;s:23:"site_forums_double_post";i:1;s:14:"site_view_flow";i:1;s:18:"site_view_full_log"
;i:1;s:2
8:"site_view_torrent_snatchlist";i:1;s:18:"site_recommend_own";i:1;s:27:"site_manage_recommendations";i:1;s:15:"site_delete_tag";i:1;s:23:"site_disable_ip_history";i:1;s:14:"zip_downloader";i:1;s:10:"site_debug";i:1;s:17:"site_proxy_images";i:1;s:16:"site_search_many";i:1;s:20:"users_edit_usernames";i:1;s:16:"users_edit_ratio";i:1;s:20:"users_edit_own_ratio";i:1;s:17:"users_edit_titles";i:1;s:18:"users_edit_avatars";i:1;s:18:"users_edit_invites";i:1;s:22:"users_edit_watch_hours";i:1;s:21:"users_edit_reset_keys";i:1;s:19:"users_edit_profiles";i:1;s:18:"users_view_friends";i:1;s:20:"users_reset_own_keys";i:1;s:19:"users_edit_password";i:1;s:19:"users_promote_below";i:1;s:16:"users_promote_to";i:1;s:16:"users_give_donor";i:1;s:10:"users_warn";i:1;s:19:"users_disable_users";i:1;s:19:"users_disable_posts";i:1;s:17:"users_disable_any";i:1;s:18:"users_delete_users";i:1;s:18:"users_view_invites";i:1;s:20:"users_view_seedle
ech";i:
1;s:19:"users_view_uploaded";i:1;s:15:"users_view_keys";i:1;s:14:"users_view_ips";i:1;s:16:"users_view_email";i:1;s:23:"users_override_paranoia";i:1;s:12:"users_logout";i:1;s:20:"users_make_invisible";i:1;s:9:"users_mod";i:1;s:13:"torrents_edit";i:1;s:15:"torrents_delete";i:1;s:20:"torrents_delete_fast";i:1;s:18:"torrents_freeleech";i:1;s:20:"torrents_search_fast";i:1;s:17:"torrents_hide_dnu";i:1;s:19:"torrents_fix_ghosts";i:1;s:17:"admin_manage_news";i:1;s:17:"admin_manage_blog";i:1;s:18:"admin_manage_polls";i:1;s:19:"admin_manage_forums";i:1;s:16:"admin_manage_fls";i:1;s:13:"admin_reports";i:1;s:26:"admin_advanced_user_search";i:1;s:18:"admin_create_users";i:1;s:15:"admin_donor_log";i:1;s:19:"admin_manage_ipbans";i:1;s:9:"admin_dnu";i:1;s:17:"admin_clear_cache";i:1;s:15:"admin_whitelist";i:1;s:24:"admin_manage_permissions";i:1;s:14:"admin_schedule";i:1;s:17:"admin_login_watch";i:1;s:17:"admin_manage_wiki";i:1;
s:18:"a
dmin_update_geoip";i:1;s:21:"site_collages_recover";i:1;s:19:"torrents_add_artist";i:1;s:13:"edit_unknowns";i:1;s:19:"forums_polls_create";i:1;s:21:"forums_polls_moderate";i:1;s:12:"project_team";i:1;s:25:"torrents_edit_vanityhouse";i:1;s:23:"artist_edit_vanityhouse";i:1;s:21:"site_tag_aliases_read";i:1;}', '1')

Then go to the toolbox > permissions manager and edit the moderator
permission to whatever you think they should be. The above insert is copied
from the sysop permissions set so if you don't change the perms the
moderator permissions will be the same as sysop.

Reply to this email directly or view it on GitHubhttps://github.com//issues/37#issuecomment-33496630
.

Att,

Deivid Ramon Pinto

www.apenasmusica.net http://www.apenasmusica.net

Twitter_: @apenasmusica_

Skype_: deivid.ramon_

Facebook_: www.fb.com/deivid.ramon http://www.fb.com/deivid.ramon_

Make sure you have the MOD user level defined in the config.php (below line 71)

Its defined, but still get the same error. =(

On Tue, Jan 28, 2014 at 8:27 PM, derekisbusy notifications@github.comwrote:

Make sure you have the MOD user level defined in the config.php (below
line 71)

Reply to this email directly or view it on GitHubhttps://github.com//issues/37#issuecomment-33534427
.

Att,

Deivid Ramon Pinto

www.apenasmusica.net http://www.apenasmusica.net

Twitter_: @apenasmusica_

Skype_: deivid.ramon_

Facebook_: www.fb.com/deivid.ramon http://www.fb.com/deivid.ramon_

It fixed it on my server so I'm not sure what's wrong. There's likely something wrong with your settings. If you want you can email me your server login derekisbusy...gmail.com and I'll fix it for you for $10. Or you can find me on freelancer: http://www.freelancer.com/u/derek8691.html

Ok, thanks for the reply, I will try to find the problem, if I can not come
in contact with you.

On Wed, Jan 29, 2014 at 3:59 PM, derekisbusy notifications@github.comwrote:

It fixed it on my server so I'm not sure what's wrong. There's likely
something wrong with your settings. If you want you can email me your
server login derekisbusy...gmail.com and I'll fix it for you for $10. Or
you can find me on freelancer: http://www.freelancer.com/u/derek8691.html

Reply to this email directly or view it on GitHubhttps://github.com//issues/37#issuecomment-33611269
.

Att,

Deivid Ramon Pinto

www.apenasmusica.net http://www.apenasmusica.net

Twitter_: @apenasmusica_

Skype_: deivid.ramon_

Facebook_: www.fb.com/deivid.ramon http://www.fb.com/deivid.ramon_

I solve it by change Moderator to Mod name.

This was fixed in commit ad36035.