Events Plugin 📆

The plugin seems to cause an error when updating Discourse:

I, [2025-01-04T22:51:50.065854 #1]  INFO -- :
I, [2025-01-04T22:51:50.066464 #1]  INFO -- : > cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate'
2025-01-04 22:52:07.682 UTC [1886] discourse@discourse ERROR:  null value in column "created_at" of relation "discourse_events_event_topics" violates not-null constraint
2025-01-04 22:52:07.682 UTC [1886] discourse@discourse DETAIL:  Failing row contains (1, 1, 1239, null, events, null, null).
2025-01-04 22:52:07.682 UTC [1886] discourse@discourse STATEMENT:
	      INSERT INTO discourse_events_event_topics (topic_id, event_id, client, series_id)
	      SELECT ec.topic_id, ec.event_id, ec.client, ec.series_id
	      FROM discourse_events_event_connections ec

rake aborted!
StandardError: An error has occurred, this and all later migrations canceled: (StandardError)

PG::NotNullViolation: ERROR:  null value in column "created_at" of relation "discourse_events_event_topics" violates not-null constraint
DETAIL:  Failing row contains (1, 1, 1239, null, events, null, null).

With the plugin disabled, the update runs as expected.

3 Likes

Thanks for the heads up. I’ve pushed a fix for this. Would you mind trying to update now with the plugin installed?

4 Likes

Thanks for the quick fix, @Angus! I can confirm that it’s working smoothly again.

5 Likes

Just to let you know, the plugin is worth the money!

3 Likes

Hello

Could someone explain to me the effect (and benefit) of this option?

My brain doesn’t understand… :brain:

THANKS

image

Yes, it could be explained better.

A recurring event is a “series” of events. When you create a recurring event in an external service connected by this plugin (e.g. Google Calendar) this plugin will import all events in the series (within the import parameters you set).

If you have an automatic topic sync set up for your imported events, this setting determines whether you create one topic for that series of events or multiple. If the setting is enabled, you’ll have one topic for the series that is updated with the next event in the series when the previous one has passed. If the setting is disabled, you’ll have a topic for each event in the series.

But yes, it needs a better description.

2 Likes