-
-
Notifications
You must be signed in to change notification settings - Fork 145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Recurrence rule: last event missing #238
Comments
I'm seeing a similar issue here with an iCal feed. The last event in this series on Sunday 1st September is missing.
|
@s0600204: looks like there is an issue with the code for computing foreach ($matchingDays as $day) {
$clonedDateTime = clone $frequencyRecurringDateTime;
var_dump($clonedDateTime->format('c'));
// 2019-08-18T10:30:00+01:00
$candidateDateTimes[] = $clonedDateTime->setISODate(
$frequencyRecurringDateTime->format('Y'),
$frequencyRecurringDateTime->format('W'),
$day
);
var_dump(end($candidateDateTimes)->format('c'));
// 2019-08-11T10:30:00+01:00
}
|
Hmm, yes, I see it. It seems I need to rethink how to map different week starts onto a method ( The week number is correct - it's I should have time to look into it this weekend. |
Almost!
Perfect |
The original issue is not fixed, yet. Weekly rules may work now, but s0600204 didn't change anything in the code for daily rules. |
I only see 6 events. My code
For details see: 6events.txt |
May we ask what version of the parser you're currently running? |
I updated to v2.1.14 via Composer and replaced ICal.php manually with the one from e0e1b83 just to create the results from my last post. I was on v2.1.13 before. |
To clarify, has |
I took my base project (https://github.com/pikim/grav-plugin-events) updated the dependencies and replaced the ICal.php manually. You can see the output of this hack in #238 (comment), so the problem still exists. I didn't try it your way. I'll try to find out how I have to put the lines from your link into my project. I'm not too familiar with Composer, yet. But is that supposed to change anything? |
When I try it locally, I too get 7 events. I know nothing about - let alone ever used - Grav CMS; but I thought I'd try setting up a basic install to see if perhaps there was some incompatibility with either Grav or @pikim's events plugin for it. So, I acquired a copy of the current stable release of Grav ( I had to make the following changes to @@ -159,11 +159,14 @@
$location = $event->location;
$description = $event->description;
$last_modified = strtotime($event->last_modified);
- $recurrence_id = strtotime($event->recurrence_id);
+ if (isset($event->recurrence_id)) {
+ $recurrence_id = strtotime($event->recurrence_id);
+ }
$start = strtotime($event->dtstart);
$end = strtotime($event->dtend);
// split if element exists
+ $categories = array();
if( isset($event->categories) ) {
$categories = explode(',', $event->categories);
} ...but made no other changes or altered any configuration from the defaults beyond providing the path to the remote file that I wished it to process (the same one as in the original post). After selecting "Save" in the Admin layout, the events in the file were output across 7 files (one for each event): @pikim have you made any changes to your plugin that you haven't made public? |
Description of the Issue:
The last event of a recurrence rule is missing. In the attached file is an recurring event with
This should result in 7 events with the last one on November 11th. The parser returns 6 events with the last one on November 10th.
Steps to Reproduce:
Rename test.txt to
*.ics
and load it. Dump the returned events.The text was updated successfully, but these errors were encountered: