Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » Blog Module Archive - Fatal Error

Our old forums are still available as a read-only archive.

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

Page: 1
Go to End
Author Topic: 1697 Views
  • areikiera
    Avatar
    Community Member
    26 Posts

    Blog Module Archive - Fatal Error Link to this post

    Hello all!

    I'm running into an obnoxious problem...

    I've installed the Blog Module, and it's working wonderfully, except when I click the Archive Link. Then, I get a big red-bordered page explaining:

    "FATAL ERROR: DATABASE ERROR: Couldn't run query: SELECT `SiteTree_Live`.*, `UserDefinedForm_Live`.*, `SubscribeForm_Live`.*, `BlogEntry_Live`.*, `BlogHolder_Live`.*, `ArticlePage_Live`.*,..........

    ..... and so on.

    Anybody else run into this problem?

    I also see a similar page when I try to use Silverstripe to email form results...

    Thanks so much!

  • SiSt
    Avatar
    Community Member
    5 Posts

    Re: Blog Module Archive - Fatal Error Link to this post

    You may have a db field in one of your own classes named date. If so rename it, run /db/build and go to PhpMyAdmin or something similar and delete the column in the table named like your class, and all others that begin with you class name and have a suffix like _Live etc.

  • areikiera
    Avatar
    Community Member
    26 Posts

    Re: Blog Module Archive - Fatal Error Link to this post

    Thank you! Worked like a charm. I'm still wrapping my head around some of these concepts, and I really appreciate the help along the way!

  • Garrett
    Avatar
    Community Member
    245 Posts

    Re: Blog Module Archive - Fatal Error Link to this post

    Hi,

    I am also getting the "Column 'Date' in where clause is ambiguous" error when clicking any Archive link in the blog module.

    However, I do NOT have any custom columns named Date in any of my tables. The blog module gave me this error right out of the box.

    Any ideas?

    Thanks,
    Garrett

  • Willr
    Avatar
    Forum Moderator
    5482 Posts

    Re: Blog Module Archive - Fatal Error Link to this post

    If you are using a recent dailybuild of the blog module http://dailybuilds.silverstripe.com then it should be fixed but basically you need to code through BlogHolder.php and other PHP code files in blog and where it uses any DataObject::get() and you see something like Date in the 2nd parameter then you need to change that to `BlogEntry`.Date - what that does is prefix the blog table to the column name and you shouldn't have any problems

  • Garrett
    Avatar
    Community Member
    245 Posts

    Re: Blog Module Archive - Fatal Error Link to this post

    Thanks, willr-- yes, I figured this out. Although in my case it looks like I have to use BlogEntry_Live.Date.

    Regards,
    Garrett

    1697 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.