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   1797 Views

Avatar
areikiera

Community Member, 26 Posts

16 February 2008 at 10:27am

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

Community Member, 5 Posts

26 February 2008 at 9:42am

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

Community Member, 26 Posts

27 February 2008 at 3:53am

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

Community Member, 245 Posts

23 August 2008 at 6:47am

Edited: 23/08/2008 6:47am

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

Forum Moderator, 5513 Posts

23 August 2008 at 12:07pm

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

Community Member, 245 Posts

26 August 2008 at 12:58am

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

Regards,
Garrett