integreat-cms icon indicating copy to clipboard operation
integreat-cms copied to clipboard

Sending feedback for recurring events not working

Open timobrembeck opened this issue 2 years ago • 2 comments

Describe the Bug

The feedback endpoint only accepts event slugs which really exist in the database, so it fails for all recurring events where we generate a bunch of date-specific slugs.

Steps to Reproduce

  1. Create recurring event
  2. Retrieve event API endpoint to see which slug the recurring event now has
  3. Try to submit feedback about the event with this specific slug

Expected Behavior

The feedback should be submitted

Actual Behavior

A 404 error occurs: No matching event found for slug.

Additional Information

This is similar to https://github.com/digitalfabrik/integreat-cms/issues/1718, but only from the concept, the solution needs to be different.

timobrembeck avatar Oct 25 '22 10:10 timobrembeck

Do we need to validate a date-part of the slug? Check that it corresponds to the event? Another option would be to simply remove the date from the slug, before we retrieve the event from DB. Does it sound okay?

seluianova avatar Oct 25 '22 19:10 seluianova

Another option would be to simply remove the date from the slug, before we retrieve the event from DB. Does it sound okay?

Yes, I think removing the date string is perfectly fine, probably only relevant for edge cases to know which exact occurrence of a recurring event the feedback refers to.

timobrembeck avatar Oct 25 '22 19:10 timobrembeck