Jump to:

23478 Posts in 18941 Topics by 2878 members

General Questions

SilverStripe Forums » General Questions » Suddenly login not possible anymore

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Page: 1
Go to End
Author Topic: 536 Views
  • KayB
    Avatar
    Community Member
    3 Posts

    Suddenly login not possible anymore Link to this post

    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=%2Fadmin

    Line 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!

  • KayB
    Avatar
    Community Member
    3 Posts

    Re: Suddenly login not possible anymore Link to this post

    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);
    }

    536 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.