MrFisc Posted March 6, 2019 Posted March 6, 2019 The Calendar applications StreamItems extension takes Event ID's from the calendar_event_rsvp table and then immediately tries to load the event based on that ID. If an RSVP exists in that table for an event that no longer exists in the calendar_events table, it will throw an exception. Relevant lines of code in applications/calendar/extensions/StreamItems/StreamItems.php:50 (IPS 4.3) foreach ( \IPS\Db::i()->select( '*', 'calendar_event_rsvp', $where, 'rsvp_date DESC', 10 ) as $rsvp ) { $event = \IPS\calendar\Event::load( $rsvp[ 'rsvp_event_id' ] ); This should be trying to catch an OutOfRangeException.
newbie LAC Posted March 7, 2019 Posted March 7, 2019 Use https://invisioncommunity.com/clientarea/support/ to report bugs BTW. This fixed in 4.4
Adriano Faria Posted March 7, 2019 Posted March 7, 2019 13 hours ago, MrFisc said: If an RSVP exists in that table for an event that no longer exists in the calendar_events table, it will throw an exception. Unless you're deleting events directly via DB or not using $event->delete(), that won't happen. Related data are deleted when the event is deleted: /** * Delete Record * * @return void */ public function delete() { parent::delete(); \IPS\Db::i()->delete( 'calendar_event_rsvp', array( 'rsvp_event_id=?', $this->id ) ); \IPS\Db::i()->delete( 'calendar_event_reminders', array( 'reminder_event_id=?', $this->id ) ); /* We should not delete maps for imported events, because we do not want to reimport them */ //\IPS\Db::i()->delete( 'calendar_import_map', array( 'import_event_id=?', $this->id ) ); } But yes, an extra layer of check is always welcome.
bfarber Posted March 7, 2019 Posted March 7, 2019 I think our first question would inevitably be "how are there RSVP records in the database table for events that don't exist". That situation should not happen, and is probably the first issue we'd look to resolve. Either way, I would encourage you to submit a ticket for support so we can take a look at your site to see if this can be determined.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.