Repeating weekly events with count > 1 (i.e., every other week) were not being rendered. The culprit seems to be this part of the where clause which didn't evaluate to a whole number.


((((0 - (DAYOFWEEK('1970-01-01')*86400)) - (date_stamp - (DAYOFWEEK(day_stamp)*86400)))/604800) % 3 = 0)

date_stamp is the time of day at 11:59:59pm. The math doesn't work. It's comes out to a real number.

It's possible that MySQL 4 automatically converted modulo operations to integer, I'm not sure. I'm using MySQL 5. The attached fix puts a CEIL in the clause to manually do this conversion.

The attached patch fixes this.

It also fixes the case where the calendar_map is empty and has to be filled up, hits the maximum amount of entries it is allowed to do in one cron, then quits without rendering the nodes. The next cron then never renders these nodes because it thinks everythings done.

CommentFileSizeAuthor
eventrepeat.diff1.17 KBdouggreen

Comments

hunmonk’s picture

Status: Needs review » Closed (works as designed)

count is the number of times an event is rendered. if you want a different interval, you must use the interval setting (ie. for bi-weekly, the interval is 2).

i'm not aware that the other issue is a bug. if it is, please file it as a seperate issue, with detailed steps on how to replicate, and attach a patch to that issue if you have one. try to avoid filing issues/submitting patches that address more than one issue at a time--it gets very confusing!