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've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Releases and Announcements /

Latest news about the SilverStripe software.

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

SilverStripe 2.3.2-rc1


Go to End


26 Posts   11401 Views

Avatar
Ingo

Forum Moderator, 801 Posts

3 June 2009 at 5:35pm

Edited: 03/06/2009 5:35pm

The JS parse error doesn't give us any indication what the actual error is - please install getfirebug.com and post the ajax response including the requested URL :)

Avatar
Impressa

Community Member, 6 Posts

3 June 2009 at 9:17pm

Hi

Below is what I could see in Firebug:

93: unterminated regular expression literal $('Form_EditForm').loadActionsFromString('<input class=\"action delete\" id=\"Form_EditForm_action_unpublish\" type=\"submit\" name=\"action_unpublish\" value=\"Unpublish\" title=\"Unpublish\" /> <input class=\"action delete\" id=\"Form_EditForm_action_delete\" type=\"submit\" name=\"action_delete\" value=\"Delete from the draft site\" title=\"Delete from the draft site\" /> <input class=\"action\" id=\"Form_EditForm_action_save\" type=\"submit\" name=\"action_save\" value=\"Save\" title=\"Save\" /> <input class=\"action\" id=\"Form_EditForm_action_publish\" type=\"submit\" name=\"action_publish\" value=\"Save and Publish\" title=\"Save and Publish\" /> '); $('Form_EditForm').loadActionsFromString('<input class=\"action delete\" id=\"Form_EditForm_action_unpublish\" type=\"submit\" name=\"action_unpublish\" value=\"Unpublish\" title=\"Unpublish\" /> <input class=\"action delete\" id=\"Form_EditForm_action_delete\" type=\"submit\" name=\"action_delete\" value=\"Delete from the draft site\" title=\"Delete from the draft site\" /> <input class=\"action\" id=\"Form_EditForm_action_save\" type=\"submit\" name=\"action_save\" value=\"Save\" title=\"Save\" /> <input class=\"action\" id=\"Form_EditForm_action_publish\" type=\"submit\" name=\"action_publish\" value=\"Save and Publish\" title=\"Save and Publish\" /> ');Behaviour.addLoader(hideLoading); $('Form_EditForm').updateStatus('Published'); $('sitetree').setNodeTitle(1, 'Home'); $('Form_EditForm').elements.StageURLSegment.value = 'http://www.sonnereis.net/v2/'; $('Form_EditForm').elements.LiveURLSegment.value = 'http://www.sonnereis.net/v2/'; $('Form_EditForm').notify('PagePublished', $('Form_EditForm').elements.ID.value); statusMessage('Published \'Home\' successfully', 'good');Behaviour.addLoader(hideLoading); <!-- www.000webhost.com Analytics Code --> <script type="text/javascript" src="http://analytics.hosting24.com/count.php"></script> <noscript><a href="http://www.hosting24.com/"><img src="http://analytics.hosting24.com/count.php" alt="web hosting" /></a></noscript> <!-- End Of Analytics Code -->

Attached Files
Avatar
Impressa

Community Member, 6 Posts

3 June 2009 at 9:59pm

Hi

I've just tested the RC on another host and it does not have a javascript problem.

Thanks Ingo.

Avatar
BIBO

Community Member, 2 Posts

18 June 2009 at 6:14am

I`m still experiencing problems with /admin page in SilverStripe 2.3.2-rc4

Couldn't run query: SELECT Distinct Locale FROM SiteTree GROUP BY Locale Unknown column 'Locale' in 'field list'
Line 400 of MySQLDatabase.php

Although @slang hack helps but it seams to disable some functionality, at least i think so.

Avatar
Israel_Miranda

Community Member, 9 Posts

26 June 2009 at 5:50am

Edited: 26/06/2009 5:58am

Hi everyone. I was updating a silverstripe site from 2.3.0 to 2.3.2 had the same problem:
Couldn't run query: SELECT Distinct Locale FROM SiteTree GROUP BY Locale Unknown column 'Locale' in 'field list'
Line 400 of MySQLDatabase.php

and it was not 2.3.2 release candidate, it happened to me with the stable tar.gz download in http://silverstripe.org/assets/downloads/SilverStripe-v2.3.2.tar.gz.

I then decided I should start using svn as I read in the forum this bug has been corrected in the 2.3.2 release, and I thought so, How ??
That's the one I am using....

So I first decided to checkout the 2.3.2 tag of every core module to make sure I was using 2.3.2 release, and voila it worked!!!

My guess is that the tar.gz in the "stable-download" url is indeed a RC, and the date is wrong too, zero hour of Unix time!!

Just checkout the 2.3.2 version from svn and you all will be good to go.

Hope it helps.

Avatar
Israel_Miranda

Community Member, 9 Posts

26 June 2009 at 5:57am

Ingo, I think maybe you should take a look at this, it could save many people from having this problems.

Thank you.

Avatar
Ingo

Forum Moderator, 801 Posts

26 June 2009 at 8:53am

Hm, did any of you overwrite the CMSMain/LeftAndMain templates?
I'd need a full stacktrace to debug anything, can't say I've ever seen this problem.
Please also provide details on which version you've upgraded from,
as well as the distinct upgrade steps. Particularly around when Translatable
was enabled through _config.php (before/after upgrade? before first 2.3 dev/build run?)

Avatar
toopy

Community Member, 9 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