Forums

[resolved] [Plugin: Collapsing Archives] Fix for sparse year (1 post)

  1. aishdas
    Member
    Posted 1 year ago #

    I thought I would share a fix I needed to do. I had a year in which I only posted in January. Because it means that the last month processed in the previous year was the same as the first month processed in that year (both cases, the month was 1), the widget failed.

    My change was to insert a line at collapsArchList.php:113:

    if( $currentYear != $archPost->year ) {
    $lastYear=$currentYear;
    $currentYear = $archPost->year;
    $currentMonth = 0; # MSB, just to guarantee it won't match
    $newYear = true;

Topic Closed

This topic has been closed to new replies.

About this Topic