Closed (won't fix)
Project:
Date
Version:
6.x-2.7
Component:
Date Repeat API
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
25 Mar 2011 at 22:16 UTC
Updated:
22 Oct 2018 at 19:27 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
sdague commentedThe following patch seems to be a safe fix for this. It basically just checks to see if the date actually changed at all before it sets $moved so that we don't loop forever without moving forward. After doing this imports of all manner of odd recurrance events work, and don't put us into an infinite loop. This works with either the Date PHP4 module loaded, or with it not loaded on PHP5.2 or 5.3.
Comment #2
sdague commentedBump. It would be nice if someone looked at this.
Comment #3
karens commentedThe project page says PHP 4 issues are receiving little or no support. We are now supporting PHP 5.2 and PHP 5.3 across two versions of Drupal, which is already more than I can reasonably accomplish. PHP 4 is ridiculously old at this point and there are tons of other problems with it when it comes to using dates.
Comment #4
sdague commentedThe issue *isn't* using PHP4.
The issue is that when you disable the Date PHP4 compat library on a PHP 5.2 / 5.3 installation things go wrong. The Date PHP4 compat library has more features than the actual date implementation in PHP 5.2 / 5.3. The Date library depends on these features when parsing recurring dates, and thus *breaks* on PHP 5.2 / 5.3.
I'm all for dumping PHP4 support, but this is an issue where things break unless you load PHP4 compatibility code on new PHP, which seems pretty broken.
Comment #5
tomdisher commentedThis patch seems to be working for me - brilliant. Thank you!
Comment #6
jspayne commentedSubscribing - this patch needs to be integrated. Solved my problem as well.
Comment #7
karens commentedThe '+1 Sunday' code works fine in D7 where we don't even have a PHP4 module. I can't see any reason why this wouldn't work fine as-is. The code in date_repeat_calc.inc is the same in D6 and D7 and I've received no reports of problems in D7.
I need steps to reproduce a problem in D6.
Comment #8
sdague commentedThe situation that creates this issue:
Using feeds + ical_parser to load ical feeds and create nodes out of them. ical_parser calls down into date_repeat_calc.inc to do it's ical manipulation. If it runs into an event with an RRULE (especially those with EXCEPT or ADD in the mix), without this patch it goes into an infinite loop, eventually crashing with a PHP timeout.
All this patch makes sure is that the date_modify actually moved forward before setting $moved. It's a safety check.
Comment #10
sdague commentedUpload rebased patch
Comment #11
damienmckennaUnfortunately the D6 version of this module is no longer supported, but we appreciate the time you put into this.