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.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

Blog Module /

Discuss the Blog Module.

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

Blog Archive List - link error


Go to End


1353 Views

Avatar
boombox

Community Member, 44 Posts

17 March 2009 at 4:40pm

Hi - Just picking up on the blog post http://www.silverstripe.org/archive/show/221139#post221139
Issue is the monthly archive links didn't work. The error was:
"Column 'Date' in where clause is ambiguous"

Fix is to change Date to `BlogEntry`.Date to identify the relevant posts.

Line 43 of BlogHolder.php

if(is_numeric($month) && is_numeric($month)){
$dateCheck = "AND `BlogEntry`.Date BETWEEN '$year-$month-1' AND '$year-$month-31'";
}
else if(isset($year)){
$dateCheck = "AND `BlogEntry`.Date BETWEEN '$year-1-1' AND '$year-12-31'";
}

Can thi sbe added to SVN release by someone