MyBB Community Forums

Full Version: Problem with 2 admin functions
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi guys,

I seem to be experienced some problem with 2 admin functions.

1)

=CCCP= Forums Control Panel
---Administrator Permissions

mySQL error: 1054
Unknown column 'u.uid' in 'on clause'
Query: SELECT u.uid, u.username, u.lastactive, g.cancp, a.permsset FROM mybb_users u, mybb_usergroups g LEFT JOIN mybb_adminoptions a ON (a.uid=u.uid) WHERE u.usergroup=g.gid AND g.cancp='yes' ORDER BY u.username ASC

2) When managing groups (adding a new one)

mySQL error: 1264
Out of range value adjusted for column 'pmquota' at row 1
Query: INSERT INTO mybb_usergroups (type, title, description, namestyle, usertitle, stars, starimage, image, isbannedgroup, canview, canviewprofiles, candlattachments, canpostthreads, canpostreplys, canpostattachments, canratethreads, caneditposts, candeleteposts, candeletethreads, caneditattachments, canpostpolls, canvotepolls, canusepms, cansendpms, cantrackpms, candenypmreceipts, pmquota, cansendemail, canviewmemberlist, canviewcalendar, canaddpublicevents, canaddprivateevents, canviewonline, canviewwolinvis, canviewonlineips, cancp, issupermod, cansearch, canusercp, canuploadavatars, canratemembers, canchangename, showforumteam, usereputationsystem, cangivereputations, reputationpower, maxreputationsday, candisplaygroup, attachquota, cancustomtitle) VALUES ('2', 'test', '', '{username}', 'test', '4', 'images/star.gif', '', 'no', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes', '', 'yes', 'yes', 'yes', 'no', 'no', 'yes', 'no', 'no', 'no', 'no', 'yes', 'yes', 'yes', 'yes', 'no', 'no', 'yes', 'yes', '1', '5', 'no', '10000', 'no');

Did anyone get this problem? Is there a fix?

Thanks
What version of MyBB are you running?
1) Open admin/adminoptions.php

Find:
	$query = $db->query("SELECT u.uid, u.username, u.lastactive, g.cancp, g.title as usergroup, a.permsset FROM ".TABLE_PREFIX."users u, ".TABLE_PREFIX."usergroups g LEFT JOIN ".TABLE_PREFIX."adminoptions a ON (a.uid=u.uid) WHERE u.usergroup=g.gid AND g.cancp='yes' ORDER BY u.username ASC");

REPLACE with:
	$query = $db->query("SELECT u.uid, u.username, u.lastactive, g.cancp, g.title as usergroup, a.permsset FROM (".TABLE_PREFIX."users u, ".TABLE_PREFIX."usergroups g) LEFT JOIN ".TABLE_PREFIX."adminoptions a ON (a.uid=u.uid) WHERE u.usergroup=g.gid AND g.cancp='yes' ORDER BY u.username ASC");

2) Open admin/usergroups.php

Find:
		"pmquota" => $mybb->input['pmquota'],

REPLACE with:
		"pmquota" => intval($mybb->input['pmquota']),

You should be able to find two instances of that - replace them both.

These have already been fixed in 1.2.

Regards,
Chris
So I guess version 1.2 is currently being tested and will be released soon? In the mean time I there is a fix. Thanks alot!