Jump to:

1851 Posts in 1606 Topics by 561 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: 861 Views
  • boombox
    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

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.