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.

Archive

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

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

Blog Module Archive - Fatal Error


Reply

6 Posts   1721 Views

Avatar
areikiera

16 February 2008 at 10:27am Community Member, 26 Posts

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!

Avatar
SiSt

26 February 2008 at 9:42am Community Member, 5 Posts

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.

Avatar
areikiera

27 February 2008 at 3:53am Community Member, 26 Posts

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!

Avatar
Garrett

23 August 2008 at 6:47am (Last edited: 23 August 2008 6:47am), Community Member, 245 Posts

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

Avatar
Willr

23 August 2008 at 12:07pm Forum Moderator, 5511 Posts

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

Avatar
Garrett

26 August 2008 at 12:58am Community Member, 245 Posts

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

Regards,
Garrett