Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

Installing SilverStripe /

Getting SilverStripe up and running on your computer and on your web server.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Admin problems with Silverstripe v2.3.4


Go to End


2 Posts   2410 Views

Avatar
armadus

Community Member, 1 Post

7 December 2009 at 8:54pm

I have a problem when I install the latest version of Silverstripe. When i access the http://localhost/silverstripe/admin and attempt to login I get the following message:

[User Error] Couldn't run query: SELECT Distinct Locale FROM SiteTree GROUP BY Locale Unknown column 'Locale' in 'field list'
GET /silverstripe/admin/

Line 401 in C:\wamp\www\silverstripe\sapphire\core\model\MySQLDatabase.php

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

I have installed it on my vista machine before and have not come across the problem.
If anyone else has had this problem and found a solution please help me.

Avatar
Doverose

Community Member, 8 Posts

9 February 2010 at 12:09pm

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