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.

Releases and Announcements /

Latest news about the SilverStripe software.

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

SilverStripe 2.3.2-rc1


Go to End
Reply


27 Posts   7095 Views

Avatar
toopy

Community Member, 8 Posts

29 June 2009 at 12:53am

Hello

I'm not sure wether the following trace can be of any help?

I had this error in a completely new and empty installation of the actual stable v2.3.2.tar.gz version downloaded today, when intending to start the CMS by /admin. It looks like the error that other people have stated in this thread.

--------------------------------
[User Error] Couldn't run query: SELECT Distinct Locale FROM SiteTree GROUP BY Locale Unknown column 'Locale' in 'field list'
GET /silverstripe/admin
Line 400 in C:\wamp\www\silverstripe\sapphire\core\model\MySQLDatabase.php

Source
391    }
392    
393    function databaseError($msg, $errorLevel = E_USER_ERROR) {
394       // try to extract and format query
395       if(preg_match('/Couldn\'t run query: ([^\|]*)\|\s*(.*)/', $msg, $matches)) {
396          $formatter = new SQLFormatter();
397          $msg = "Couldn't run query: \n" . $formatter->formatPlain($matches[1]) . "\n\n" . $matches[2];
398       }
399       
400       user_error($msg, $errorLevel); (((this line in red color)))
401    }
402 }
403
404 /**
405 * A result-set from a MySQL database.
406 * @package sapphire
Trace
•Couldn't run query: SELECT Distinct Locale FROM SiteTree GROUP BY Locale Unknown column 'Locale' in 'field list'
Line 400 of MySQLDatabase.php
•MySQLDatabase->databaseError(Couldn't run query: SELECT Distinct Locale FROM SiteTree GROUP BY Locale | Unknown column 'Locale' in 'field list',256)
Line 102 of MySQLDatabase.php
•MySQLDatabase->query(SELECT Distinct Locale FROM SiteTree GROUP BY Locale,256)
Line 120 of DB.php
•DB::query(SELECT Distinct Locale FROM SiteTree GROUP BY Locale)
Line 426 of SQLQuery.php
•SQLQuery->execute()
Line 1133 of Translatable.php
•Translatable::get_existing_content_languages(SiteTree)
Line 1204 of CMSMain.php
•CMSMain->MultipleLanguages()

•call_user_func_array(Array,Array)
Line 550 of ViewableData.php
•ViewableData->cachedCall(MultipleLanguages,,)
Line 591 of ViewableData.php
•ViewableData->hasValue(MultipleLanguages)
Line 314 of .cacheC..wamp.www.silverstripe.cms.templates.Includes.CMSMain_left.ss
•include(C:\WINDOWS\Temp\silverstripe-cacheC--wamp-www-silverstripe\.cacheC..wamp.www.silverstripe.cms.templates.Includes.CMSMain_left.ss)
Line 354 of SSViewer.php
•SSViewer->process(CMSMain)
Line 773 of ViewableData.php
•ViewableData->renderWith(Array)
Line 480 of LeftAndMain.php
•LeftAndMain->Left()

•call_user_func_array(Array,Array)
Line 408 of ViewableData.php
•ViewableData->XML_val(Left,,1)
Line 59 of .cacheC..wamp.www.silverstripe.cms.templates.LeftAndMain.ss
•include(C:\WINDOWS\Temp\silverstripe-cacheC--wamp-www-silverstripe\.cacheC..wamp.www.silverstripe.cms.templates.LeftAndMain.ss)
Line 354 of SSViewer.php
•SSViewer->process(CMSMain)
Line 175 of Controller.php
•Controller->handleAction(HTTPRequest)
Line 129 of RequestHandler.php
•RequestHandler->handleRequest(HTTPRequest)
Line 122 of Controller.php
•Controller->handleRequest(HTTPRequest)
Line 277 of Director.php
•Director::handleRequest(HTTPRequest,Session)
Line 121 of Director.php
•Director::direct(/admin)
Line 118 of main.php

Avatar
Ingo

Forum Moderator, 801 Posts

29 June 2009 at 8:16am

Your CMS templates are calling non-existent values like $MultipleLanguages - should be a simple matter of flushing the cache via ?flush=1. If that doesn't help, please remove the C:\WINDOWS\Temp\silverstripe-cacheC--wamp-www-silverstripe\ directory in your webroot as shown in the stacktrace. This would happen on a new installation because it uses the same temp directory.
It might actually be a cache invalidation error with SilverStripe on windows, did you see similiar behaviour when changing any custom page templates, which didn't get updated right away?

Avatar
toopy

Community Member, 8 Posts

29 June 2009 at 6:12pm

Thanks a lot Ingo!

This helped: http://localhost/silverstripe/admin/?flush=1

I wonder why I did not try this before on my own? I think it was because the idea of making a completely new installation and therefore not bothering about caching.

Yours Toopy

Go to Top