Jump to:

1835 Posts in 1139 Topics by 554 members

Blog Module

SilverStripe Forums » Blog Module » Blog Archive List - link error

Discuss the Blog Module.

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

Page: 1
Go to End
Author Topic: 809 Views
  • boombox
    Avatar
    Community Member
    44 Posts

    Blog Archive List - link error Link to this post

    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

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