I have a calendar block view. It used to provide a link to the calendar month view.
With the upgrade, the link is gone.

Apologies if this is a view configuration error (I couldn't figure it out).

Theme is garland.

Screenshot attached.

CommentFileSizeAuthor
CalendarLinkProb.png44.24 KBdgeilhufe@yahoo.com

Comments

Tony Sharpe’s picture

I just noticed the same thing having just come across the following in function_theme_date_nav_title, so I assume it's something yet to be sorted. I seem to remember that it used to work. I'm using latest dev versions.

	  // TODO Update this.
  //if (!empty($view->mini) || $link) {
  //	// Month navigation titles are used as links in the mini view.
  //	return l($title, $url, array(), calendar_url_append($view));
  //}
  //else {
    return $title;
  //}  
karens’s picture

Status: Active » Fixed

This has been fixed since rc2.

Tony Sharpe’s picture

Now works thanks.

dwees’s picture

Status: Fixed » Active

I think this is still active.

Looking in calendar-mini.tpl.php on line 28 we see that the link/not link is embedded with a call to theme('date_navigation', $view);

So I did a search for date_navigation in the calendar module files and only came up with one other hit, in calendar-main.tpl.php which uses exactly the same code.

I did find calendar-nav.tpl.php which seems to include the code in question but it is clear from 35 that no link is going to be built with this code.

Is there something I am missing here?

FYI - thanks for the comment on line 325, sorry for no stable release, developing for Drupal is my hobby not my profession.

Dave

dwees’s picture

Okay I found the code in question and have uncommented it and removed the reference to the calendar_url_append($view) since l only takes 3 arguments now, and calendar_url_append is no longer valid.

Next step, get the link working...maybe I should download RC2 and see if this code somehow got scrubbed along the way?

Dave

dwees’s picture

Looks like this fix works for me, don't know how generic it is.

Change lines 80 to 83 in date/theme/theme.inc from


    case 'month':
      $title = date_format_date($view->min_date, 'custom', !empty($format) ? $format : 'F');
      $url = $view->url .'/'. $view->year .'-'. date_pad($view->month);
      break;

to


    case 'month':
      $title = date_format_date($view->min_date, 'custom', !empty($format) ? $format : 'F');
      if ($view->mini) {
        $url = $view->url;
      }
      else {
        $url = $view->url .'/'. $view->year .'-'. date_pad($view->month);
      }
      break;

pancho’s picture

Project: Calendar » Date
Version: 6.x-2.0-rc2 » 6.x-2.0-rc4
Status: Active » Fixed

In RC5 the bug finally seems to be fixed in Date module (see commit 147599). Moving this issue there and marking it as fixed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.