Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Regardless of the date, the node $title displays as
l, December, j, Y-1
where the only variable that corresponds to the correct date is j and Y
egs :
http://trishturliuk.ca/blog/2006/10/30
http://trishturliuk.ca/blog/2007/04/6
Comment | File | Size | Author |
---|---|---|---|
#6 | calendar.theme_.txt | 15.39 KB | tkgafs |
#5 | theme_3.patch | 1.58 KB | tkgafs |
#3 | Untitled-2_1.jpg | 29.02 KB | tkgafs |
Comments
Comment #1
brst t CreditAttribution: brst t commentedEr uh, egs :
http://trishturliuk.ca/archive/2006/10/30
http://trishturliuk.ca/archive/2007/04/6
Had to rename the calendar view url as it was conflicting with my blog view.
Comment #2
brst t CreditAttribution: brst t commentedAble to fix this mismatch of node title and date by commenting out lines 75-79 in calendar.theme, corresponding to DAY and for me, only because it's irrelevant to my purposes, WEEK.
Comment #3
tkgafs CreditAttribution: tkgafs commentedI can confirm this behaviour see attached screen shot
Comment #4
tkgafs CreditAttribution: tkgafs commentedhaving put some print statements into function theme_calendar_nav_title the problem seems to be that $view->mon is not set when field_type is DAY
please see the following output from a debug run, the date being used is 10th May 2007
if you hard code $view->mon = 5 in the DAY switch section the date is then displayed correctly
here is the amended function I have been messing about with
I have also noticed that later on in the file in the function theme_calendar_nav_title
$view->month is used rather than $view->mon
I have tried changing these but without any success
so if anyone can point out where the value of $view->mon is getting unset I'd be very grateful
tkgafs
Comment #5
tkgafs CreditAttribution: tkgafs commentedOk worked it out
the $view->mon in function theme_calendar_arg_title should in fact be $view->month
there is another problem that becomes apparent after fixing this one if you go for the year view the title always comes up one year less than the year being displayed
i have attached a patch which fixes both problems
the patch is against $Id: calendar.theme,v 1.1.2.15 2007/04/03 13:02:43
from calendar-5.x-1.x-dev.tar.gz dated April 20th
I have not created a patch before so the attached may not be quite correct but heres hoping
I will also upload an entire new copy of calendar.theme in case my patch is not quite in the right format
Tkgafs
Comment #6
tkgafs CreditAttribution: tkgafs commenteda new version of calendar.theme renamed to calendar.theme.txt to allow it to be uploaded
Tkgafs
Comment #7
thrlls33kr CreditAttribution: thrlls33kr commentedRan into the same thing, ended up with the same solution. All it takes is replacing $view->mon with $view->month all through theme_calendar_arg_title.
H.
Comment #8
Shane Birley CreditAttribution: Shane Birley commentedI will confirm this error is also fixed via #6 solution of correcting the calendar.theme file.
Comment #9
KarenS CreditAttribution: KarenS commentedI missed this earlier issue when fixing http://drupal.org/node/163552. This is a duplicate and that fix should also fix this. Sorry to take so long getting to this!
Comment #10
KarenS CreditAttribution: KarenS commentedOops, just noticed your fix for $view->month == 'all', just committed that, too. Thanks!
Comment #11
(not verified) CreditAttribution: commented