Skip to content
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

Edgecase: daily recurring event raises NotFound error on existing occurrence #172

Open
petschki opened this issue Jan 12, 2015 · 2 comments

Comments

@petschki
Copy link
Member

I Don't know if this is a bug or just something to document but this is what happens:

  1. Create an Event: from 2015-01-19 20:00to 2015-01-20 03:00
  2. Repeat this Event daily
  3. try to access any occurrence after the first day (eg. /path/to/event/2015-01-20)
  4. => NotFound Error

This is because the OccurrenceTraverser reads all event occurrences happening on 2015-01-20 but gets the occurrence from 2015-01-19 (because it's leaping over midnight) as first item which unfortunately is not is_same_day and returns the fallbackTraverse which - of course - cannot find the path (starting here https://github.com/plone/plone.app.event/blob/master/plone/app/event/recurrence.py#L109)

My solution for this is to make daily recurring events not leaping over midnight or make them open_end events

@mjfinney
Copy link

I also had this issue. Someone made an event from 2015-09-20 to 2015-09-27 and recurring daily until 2015-09-27. It listed the event 8 times but trying to access any url with an occurrence date gave a NotFoundError. In my case the user should have entered the end date on the same day. Some form validation to catch mistakes like this could also help.

@mjfinney
Copy link

mjfinney commented Mar 4, 2016

I just ran into this problem again with monthly recurrence. Another edge case where a user had entered in an event that lasted the entire month and repeated monthly on the first day of the month.

  • Start November 1 2015
  • End November 30 2015
  • marked as "whole day"
  • Recurring the first day of every month and recurring 7 times

This worked fine until March 2016

  • event-url/2016-03-01 gave a 404
  • event-url/2016-04-01 worked properly
  • event-url/2016-05-01 gave a 404.

I had to change the event to end November 28th so that March and May occurrences will show up. I'm assuming it is because February 30th 2016 is really March 1st 2016 causing a similar issue as above. In this case it is probably safe to assume the user just means the last day of the month. If the user starts with a month that ends in 31st, this would affect more months than just February/March.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants