The ordinal display worked fine in 6.x-2.1 (did not try earlier versions). The date lines were missing entirely for unauthenticated users in all versions (is this normal? Is there some setting I need to change in permissions or some such?).
I re-saved the Event and the Calendar Events View after upgrading to the new dev version, which I did to fix the warning error messages.
Upcoming View modified to show Repeating Date Rule.
Logged-in user sees:
Upcoming Events
- Repeating Event’s Title
Repeats every month on the Thursday until Sat Dec 31 2011 .
Thursday, May 14, 2009 - 5:30pm
(note also the stray space after the year but before the period on the “Repeats” line)
Unauthenticated user sees:
Upcoming Events
- Repeating Event’s Title
Both should see:
Upcoming Events
- Repeating Event’s Title
Repeats every month on the Second Thursday until Sat Dec 31 2011.
Thursday, May 14, 2009 - 5:30pm
Also, for cosmetic purposes, the hyphen in the long date/time line should be an em dash, but I think I can change this through custom formatting.
One thing that may be causing this: I noted that when I executed the query directly in MySql Query Browser, the “field_date_rrule” field was like this in the earlier version:
RRULE:FREQ=MONTHLY;INTERVAL=1;BYDAY=2TH;UNTIL=20111231T060000Z;WKST=SU
After upgrading to the dev version and re-saving the Event content data, that field changed slightly:
RRULE:FREQ=MONTHLY;INTERVAL=1;BYDAY=+2TH;UNTIL=20111231T060000Z;WKST=SU
(Note the addition of the “+”)
P.S. A general comment on these Forums: “Allowed HTML tags” really needs to add “<ins>” to the list, so that we can easily properly notate added text as well as deleted text in displays, field data, etc., using proper content-specific HTML instead of resorting to boldfaced or underscore tags.
Comment | File | Size | Author |
---|---|---|---|
#7 | date_repeat_ordinal.patch | 969 bytes | mr. chips |
Comments
Comment #1
Joel MMCC CreditAttribution: Joel MMCC commentedUpdate: This bug remains after upgrade to Date module Version 6.2-2.2 (May 14th) as well as the 6.2-2.x-dev (May 12th) which I originally reported. I’m not sure if this is caused by Calendar or by Date.
Comment #2
Joel MMCC CreditAttribution: Joel MMCC commentedThe unauthenticated user not seeing the dates at all was simply due to permissions not having been set for them to see them. Apparently, all CCK fields (not node fields such as Title, Body, etc.) are hidden from everyone except Administrators [or perhaps User/1] by default.
The missing ordinal problem remains an apparent bug. Plus, I just found another one. I’ll submit it as a new Issue.
Comment #3
ericm CreditAttribution: ericm commentedI see this one too. What should be "first Tuesday" is rendered "Tuesday", "second Thursday" is showing "Thursday" etc. The dates are repeating correctly, but the repeat rule statement that's displayed is missing the ordinal.
Comment #4
mr. chips CreditAttribution: mr. chips commentedI see the missing ordinal too in Date-6.x-2.x-dev from June 9th. That is, 'Repeats every month on the Saturday...' instead of 'Repeats every month on the second Saturday...'.
So in date_repeat.module around line 193 I replaced this:
$results[] = trim(t('!repeats_every_interval on the !date_order !day_of_week', array('!repeats_every_interval ' => '', '!date_order' => strtolower($counts[$count]), '!day_of_week' => $days[$day])));
with this:
$results[] = trim(t('!repeats_every_interval on the !date_order !day_of_week', array('!repeats_every_interval ' => '', '!date_order' => strtolower($counts[substr($byday, 0, 2)]), '!day_of_week' => $days[$day])));
Note that $counts[$count] became $counts[substr($byday, 0, 2)].
I think this only affects the human readable display of the repeat rule. Not sure if what I did is good coding but it seems to work for me, hope this helps.
Comment #5
Joel MMCC CreditAttribution: Joel MMCC commentedTo make Mr. Chip’s patch more readable:
So in date_repeat.module around line 193 I replaced this:
$results[] = trim(t('!repeats_every_interval on the !date_order !day_of_week', array('!repeats_every_interval ' => '', '!date_order' => strtolower($counts[$count]), '!day_of_week' => $days[$day])));
with this:
$results[] = trim(t('!repeats_every_interval on the !date_order !day_of_week', array('!repeats_every_interval ' => '', '!date_order' => strtolower($counts[substr($byday, 0, 2)]), '!day_of_week' => $days[$day])));
Since a proposed patch has been submitted (albeit not in actual *.patch format), I’ve altered the Status to “needs work.”
Mr. Chip, do you know how to make a *.patch? If you do, Attach it, and set Status to “needs review” so that the Test Bot and other users can test it.
Comment #6
mr. chips CreditAttribution: mr. chips commentedJoel MMCC,
Make a *.patch? No, I'm fairly new to Drupal and my learning curve is still quite flat. Heck, I couldn't even make my post easy to read! (wait, I got it out now)
Do you mean my fix is the 'proposed' patch? I'll see if I can figure out how to make it proper then...
Comment #7
mr. chips CreditAttribution: mr. chips commentedWell, I think I've got it. I made this patch from the directory sites/all/modules/date. Then I applied it to my system and it worked. (Do you sense my surprise?) I used diff to make and apply it, if that matters.
BTW, I think KarenS has done a fantastic job on Calendar and Date!
Comment #8
mr. chips CreditAttribution: mr. chips commentedDoesn't this really belong in the Date project? Not sure if I can move it there or not...
Comment #9
mr. chips CreditAttribution: mr. chips commentedChanging to needs review as per Joel MMCC
Comment #10
Joel MMCC CreditAttribution: Joel MMCC commented“BTW, I think KarenS has done a fantastic job on Calendar and Date!”
Agreed!
I had originally put this in “Calendar” since the problem seemed to be a function of the View that makes Event Calendars work, but since you tracked the code down to the Date_Repeat API sub-module, that indeed is the better choice. I also just now assigned the Component accordingly.
Comment #11
pauldawg CreditAttribution: pauldawg commentedTried this fix and it seems to work okay. I am subscribing to this.
Comment #12
pauldawg CreditAttribution: pauldawg commentedI will be putting a new patch up in the next few days which addresses this as well as a few other related quirks in the repeat rule display logic.
Comment #13
pauldawg CreditAttribution: pauldawg commentedPosted new issue #583192: Improve readability and accuracy of repeat rule display text
Comment #14
NancyDruRTBC
Comment #15
jackalope CreditAttribution: jackalope commentedI was also having this problem and the patch in #7 fixed it; thanks!
I'm surprised that months later neither this patch nor the larger undertaking in #583192: Improve readability and accuracy of repeat rule display text have been incorporated (I'm using 6.x-2.x-dev)! Any plans for incorporating either/both?
Comment #17
KarenS CreditAttribution: KarenS commentedCommitted #7, thanks!