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

Events set to repeat are not appearing on the calendar. #12

Open
JDSlimz opened this issue Jan 18, 2017 · 5 comments
Open

Events set to repeat are not appearing on the calendar. #12

JDSlimz opened this issue Jan 18, 2017 · 5 comments

Comments

@JDSlimz
Copy link

JDSlimz commented Jan 18, 2017

I installed the plugin on a fresh WP install. When I create a new event and set it to repeat, it only appears on the calendar for the day I set the initial event. It does not appear every Monday. This is the only plugin installed on the site. No possibility of conflicts. Would LOVE to add some features to this shortly down the road. I am going to look through the code and see if I can find the issue, just wanted to make you aware of the issue (if it is an issue and not by design).

@JDSlimz
Copy link
Author

JDSlimz commented Jan 18, 2017

Posts are getting proper meta value of wp_event_calendar_repeat = 10.

@jeremyfelt
Copy link
Contributor

Hi @JJJ - I'm also interested in the repeat functionality. After browsing through the code a bit today, it appears to not be connected yet. I'm wondering if you had thoughts on how to approach that down the road.

My two guesses came down to:

  1. A cron event processes repeating events and creates new entries in the future for X occurrences. As the post type is set to hierarchical, it's possible these could be post children?
  2. Additional data about the conditions of the repeat is stored on the event and the view is able to query for all events that should appear on the view. (Haven't thought this through more than that)

🍻

@JJJ
Copy link
Contributor

JJJ commented May 13, 2017

I've gone back and forth about this, too. I've also investigated how other software solved this problem, and (as you can imagine) they range from clever to unbelievably bad.

After having given this a lot (alot alot) of thought, I think I've settled on an additional meta data value that has some creative formatting to delineate the more complex repetitions: (every other week, second Tuesday of each month, etc)

Then, depending on the performance difference, either adding a meta_query clause, or performing an additional query for that clause only, and combining the results together.

@jeremyfelt
Copy link
Contributor

That makes sense and seems approachable as long as the intervals are kept simple. If I viewed the calendar for today, the query could be for events that are tagged something like:

  • Weekly based on week day number - repeat_daily_day_1
  • Third Monday of every month - repeat_monthly_third_day_1
  • Every other week - repeat_weekly_even_week_day_1
  • Monthly based on date - repeat_monthly_date_15
  • Annual based on date - repeat_yearly_month_05_date_15

These could be meta keys where the meta value is the timestamp for when it expires. Then you could look for all repeat_daily_day_1 with an expiration < 1496707200 or something.

I poked at repeating intervals in ISO 8601 for a minute, but it seems like that applies more as "this event is a week long repeat it every week" rather than "this event is an hour long, repeat it once a week". The syntax is interesting, but seems like it would be difficult to query backward. It may be useful to look at it as a guide to how a custom syntax should look.

@Pixelrobin
Copy link

Pixelrobin commented Apr 12, 2018

Any updates on this? I'm doing pretty hacky stuff right now to get it working for my use case. It would be really nice for developers to have official support for this, as it exists and users are expecting it to function.

I am willing to help with the implementation the best I could, as long as a standard is set.

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

No branches or pull requests

4 participants