I seem to have a similar problem when trying to log in as a member without admin rights.
Strangely, I cannot reproduce the error when I install a mirror running on wamp locally. It only happens the web server.
I have tried deleting tables and rebuilding but all to no avail.
I was running 2.3.4 but even upgrading to 2.3.6 has brought no change.
The error message is as follows:
Source
392 }
393
394 function databaseError($msg, $errorLevel = E_USER_ERROR) {
395 // try to extract and format query
396 if(preg_match('/Couldn\'t run query: ([^\|]*)\|\s*(.*)/', $msg, $matches)) {
397 $formatter = new SQLFormatter();
398 $msg = "Couldn't run query: \n" . $formatter->formatPlain($matches[1]) . "\n\n" . $matches[2];
399 }
400
401 user_error($msg, $errorLevel);
402 }
403 }
404
405 /**
406 * A result-set from a MySQL database.
407 * @package sapphire
Trace
* Couldn't run query: SELECT COUNT(`Permission`.`ID`) FROM `Permission` INNER JOIN `Group` ON `Group`.`ID` = `Permission`.`GroupID` AND `Group`.`SubsiteID` = 0 INNER JOIN `Group_Members` USING(`GroupID`) WHERE `Permission`.`Code` IN ('CMS_ACCESS_NewsletterAdmin','ADMIN') AND `MemberID` = 22 Unknown column 'db267559.Group.GroupID' in 'on clause'
Line 401 of MySQLDatabase.php
* MySQLDatabase->databaseError(Couldn't run query: SELECT COUNT(`Permission`.`ID`) FROM `Permission` INNER JOIN `Group` ON `Group`.`ID` = `Permission`.`GroupID` AND `Group`.`SubsiteID` = 0 INNER JOIN `Group_Members` USING(`GroupID`) WHERE `Permission`.`Code` IN ('CMS_ACCESS_NewsletterAdmin','ADMIN') AND `MemberID` = 22 | Unknown column 'db267559.Group.GroupID' in 'on clause',256)
Line 102 of MySQLDatabase.php
* MySQLDatabase->query( SELECT COUNT(`Permission`.`ID`) FROM `Permission` INNER JOIN `Group` ON `Group`.`ID` = `Permission`.`GroupID` AND `Group`.`SubsiteID` = 0 INNER JOIN `Group_Members` USING(`GroupID`) WHERE `Permission`.`Code` IN ('CMS_ACCESS_NewsletterAdmin','ADMIN') AND `MemberID` = 22 ,256)
Line 120 of DB.php
* DB::query( SELECT COUNT(`Permission`.`ID`) FROM `Permission` INNER JOIN `Group` ON `Group`.`ID` = `Permission`.`GroupID` AND `Group`.`SubsiteID` = 0 INNER JOIN `Group_Members` USING(`GroupID`) WHERE `Permission`.`Code` IN ('CMS_ACCESS_NewsletterAdmin','ADMIN') AND `MemberID` = 22 )
Line 415 of Subsite.php
* Subsite::hasMainSitePermission(Member,Array)
Line 89 of LeftAndMainSubsites.php