21490 Posts in 5783 Topics by 2622 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 304 Views |
-
Suddenly login not possible anymore

14 March 2012 at 9:56pm
Heya!
Currently I am working on a SilverStripe project, and everything seems to be running smooth.
But then things changed.. This morning I tried to login and I got the message that an error occured.
Running in development mode gave the following errormessage:[User Error] Couldn't run query: SELECT "SiteTree_Live"."ClassName", "SiteTree_Live"."Created", "SiteTree_Live"."LastEdited", "SiteTree_Live"."URLSegment", "SiteTree_Live"."Title", "SiteTree_Live"."MenuTitle", "SiteTree_Live"."Content", "SiteTree_Live"."MetaTitle", "SiteTree_Live"."MetaDescription", "SiteTree_Live"."MetaKeywords", "SiteTree_Live"."ExtraMeta", "SiteTree_Live"."ShowInMenus", "SiteTree_Live"."ShowInSearch", "SiteTree_Live"."HomepageForDomain", "SiteTree_Live"."ProvideComments", "SiteTree_Live"."Sort", "SiteTree_Live"."HasBrokenFile", "SiteTree_Live"."HasBrokenLink", "SiteTree_Live"."Status", "SiteTree_Live"."ReportClass", "SiteTree_Live"."CanViewType", "SiteTree_Live"."CanEditType", "SiteTree_Live"."ToDo", "SiteTree_Live"."Version", "SiteTree_Live"."ParentID",
Read full error message: http://pastebin.com/TrjrEzUn
... WHERE ("SiteTree_Live"."ClassName" IN ('Page','BlogEntry','BlogTree','DienstHolder','DienstPage','FaqHolder','FaqPage','FrontPage','MemberPage','TeamPage','ErrorPage','RedirectorPage','VirtualPage','UserDefinedForm','BlogHolder')) AND (ParentID = ) ORDER BY "Sort" You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') ORDER BY "Sort"' at line 1
GET /Security/login?BackURL=%2FadminLine 525 in /home/admin/domains/stargroup.nl/public_html/sapphire/core/model/MySQLDatabase.php
I checked mysql on empty classnames, some where found but got their proper classname.
Anyone has any suggestions on how to overcome this error and get the login back to working again?Thnx in advance!
-
Re: Suddenly login not possible anymore

14 March 2012 at 11:24pm
Bug is fixxed thanks to Bollig|DesignCity in the SilverStripe IRC Channel.
It all had to do with some code in page.php
Wrong code
function Siblings() {
$whereStatement = "ParentID = ".$this->ParentID;
return DataObject::get("Page", $whereStatement);
}Fixed Code
Note to self: Always be aware of small mistakes like this..function Siblings() {
$whereStatement = "ParentID = '".$this->ParentID."'";
return DataObject::get("Page", $whereStatement);
}
| 304 Views | ||
|
Page:
1
|
Go to Top |

