I found out that on my date views with a pager the previous week link was not correctly generated... the week number was always 00.

The mistake was here:
date/date_views/theme/theme.inc - line 75ff.:

      case 'week':
        $next_week = date_week(date_format($next_date, 'Y-m-d'));
        $prev_year = (date_format($prev_date, 'n') == 12 && $prev_week == 1) ? date_format($prev_date, 'Y') + 1 : date_format($prev_date, 'Y');
        $prev_arg = $prev_year . '-W' . date_pad($prev_week);
        $next_year = (date_format($next_date, 'n') == 12 && $next_week == 1) ? date_format($next_date, 'Y') + 1 : date_format($next_date, 'Y');
        $next_arg = $next_year . '-W' . date_pad($next_week);
        break;

needs to be

      case 'week':
        $prev_week = date_week(date_format($prev_date, 'Y-m-d'));
        $next_week = date_week(date_format($next_date, 'Y-m-d'));
        $prev_year = (date_format($prev_date, 'n') == 12 && $prev_week == 1) ? date_format($prev_date, 'Y') + 1 : date_format($prev_date, 'Y');
        $prev_arg = $prev_year . '-W' . date_pad($prev_week);
        $next_year = (date_format($next_date, 'n') == 12 && $next_week == 1) ? date_format($next_date, 'Y') + 1 : date_format($next_date, 'Y');
        $next_arg = $next_year . '-W' . date_pad($next_week);
        break;

see the $prev_week = date_week(date_format($prev_date, 'Y-m-d')); in first line. I will try to write a patch during the day.

Best,
Tobias

Comments

tobiberlin’s picture

Version: 7.x-2.7 » 7.x-2.8
Status: Active » Closed (works as designed)

I am sorry - I found out that someone changed this code directly in the module's theme.inc file instead of overriding the code in a custom template.php. It is not really an issue of this module but of the project I work currently on. stupid