Try to redirect /events/[monthWithNoEvent]
to nearest future month with event
#676
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #642.
I went with option 1 described in #642, so if
/events/[yearMonth]
has no events, instead of showing a 404:Tests
If the queried month has no event but there is an event in a future month, redirect to the closest future month with an event:
vspodule-no-event-month-redirect-future.mov
If the queried month has no event and there is an event only in a past month, redirect to the last month with an event:
vspodule-no-event-month-redirect-past.mov
If the queried month has an event, perform no redirect:
vspodule-no-event-month-redirect-present.mov
If fetched events list is empty, show 404:
vspodule-no-event-month-redirect-none.mov