Jump to:

1851 Posts in 1606 Topics by 561 members

Blog Module

SilverStripe Forums » Blog Module » Yearly Archive bug and solution

Discuss the Blog Module.

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

Page: 1
Go to End
Author Topic: 989 Views
  • lx
    Community Member
    82 Posts

    Yearly Archive bug and solution Link to this post

    The yearly archive doesnt work in 0.4.0.
    For me it helped to fix the BlogTree.php like this:

    in function BlogEntries($limit = null):

    return $this->Entries("$start,$limit", $this->SelectedTag(), ($date) ? $date : '', null, $filter);
    // return $this->Entries("$start,$limit", $this->SelectedTag(), ($date) ? $date->Format('Y-m') : '', null, $filter);

    replace function SelectedDate() with:

    function SelectedDate() {
          if($this->request->latestParam('Action') == 'date') {
    $year = $this->request->latestParam('ID');
             $month = $this->request->latestParam('OtherID');

    if(is_numeric($year) && ($month===null)) {
    return $year;
    if(is_numeric($year) && is_numeric($month) && $month < 13) {
       return $year .'-'. $month;
          return false;

  • Willr
    Forum Moderator
    5508 Posts

    Re: Yearly Archive bug and solution Link to this post

    You should submit bugs (and patches) to open.silverstripe.org if you haven't done so yet. Then the maintainers can get the fix into the release and help everyone else who runs into this issue.

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.