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

Hi Angus, I performed an update on the UKDHC Discourse, following which the Discourse web app was unable to load. After some investigation, it appears that it was the events plugin that caused this. I had to disable the plugin in order for the web app to load again. Can you please investigate andand advise - thanks in advance. François

5 Likes

Angus, on the latest version, there is an issue that can block TC to work (3.5.0.beta2-dev,Theme component have become nonoperative).

Uncaught Error: Could not find module `discourse/mixins/singleton` imported from `discourse/plugins/discourse-events/discourse/models/provider`
    at loader.js:247:1
    at h (loader.js:258:1)
    at u.findDeps (loader.js:168:1)
    at h (loader.js:262:1)
    at u.findDeps (loader.js:168:1)
    at h (loader.js:262:1)
    at requireModule (loader.js:24:1)
    at y (app.js:170:18)
    at b (app.js:193:19)
    at app.js:156:29
    at g.start (app.js:167:1)
    at HTMLDocument.<anonymous> (start-app.js:5:7)
    at discourse-boot.js:13:12
    at discourse-boot.js:1:1

I believe it’s related to this change where the mixin has been refactored to a class decorator: DEV: refactor singleton mixin to class decorator by tyb-talks · Pull Request #30498 · discourse/discourse · GitHub.

4 Likes

Thanks @Arkshine, we will be reverting this commit: Revert "DEV: remove singleton mixin (#31823)" by jjaffeux · Pull Request #31857 · discourse/discourse · GitHub

@kelv will re-evaluate the situation later this week.

6 Likes

Thanks @j.jaffeux for the fix :slight_smile:

The error was occurring from here: discourse-events/assets/javascripts/discourse/models/provider.js at b38f3258115110c07951f18e2c3562ac3e68a301 · angusmcleod/discourse-events · GitHub

We deprecated the use of that Singleton mixin at the start of the year. This PR should provide some reference on how to refactor a class to use Singleton as a decorator.

@angus would you be able to take a look? It should be a fairly minimal change, the decorator can be applied on RestModel.

3 Likes

Thanks everyone. I’ve updated this plugin to use the singleton decorator.

5 Likes

@G4sD0c Could you try updating and let me know if your issue is fixed?

4 Likes

Hello,

I’m encountering a bug when creating a topic using both the Events plugin and the Location plugin.

The bug is that the topic is created without the date value entered in Events.

Details:

  • You can reopen the topic and enter the date.

  • If you create a topic without a location, the date is saved correctly.

Discourse version:3.5.0.beta1-dev
(402ec6bf5c)

Events version:0.9.5
c49ec2a

Location version:6.8.2
7eb7be3

Exemple :


A big THANK YOU for these two plugins that allow me to manage a map and calendar for RPG conventions.

I’m allowing myself to tag @merefield for info

2 Likes

@G4sD0c Just a gentle reminder to update the Events Plugin to the latest version that’s compatible with the latest Discourse :slight_smile:

2 Likes

@G4sD0c’s done that and it is working well.

I’ve noticed another wee issue though - when the Events plugin is installed but not active, it still manages to inappropriately add agenda links to top menus.

1 Like

Hi Team, from yesterday, the Events admin panel doesn’t operate.

I have pasted below different informations’


The enclosed problem appeared on iOS Safari PWA this morning


my discourse version is

v3.5.0.beta7 +463

yesterday morning it was

v3.5.0.beta7 +422

my iOS version is

the last error to appear in Discourse logs yesterday was

my Sidekiq appears as

my Sidekiq appeared yesterday as

1 Like

Hi Team,

this is an update that the UI transiently worked

admin UI appears

strange - i had Custom Header Links (Icons) Disabled and on this screenshot they’re showing. Is a backwards compatible default setting behind used?

Sidekiq appears as

last error in /logs was


Discourse i’m running is latest-release +463, 21 commits behind

1 Like

before updating discourse, i had the same problem as before, and then same problem again after enabling “Custom Header Links (Icons)”


after updating

1 Like

This discussion is continued from: Discourse-events 'this.router' error - #11 by david


I also have Discourse fully up to date, but the errors have changed slightly:

Screenshot

I have many events on the calendar that this plugin uses, but have since disabled.


We believe this plugin is broken and should be tagged as broken .

This is consistent with other reports:


Also worth noting: @Ethsim2 has proposed iCal feed sync support as a native feature in the discourse-calendar plugin. That topic already has two likes from Discourse team members — so if others are affected by this, it’s a good one to follow or support.

2 Likes

might be worth noting as-well, @Halden42


However, i can’t really deduce whether this library upgrade will provide the feature, many users of this plugin were able to rely-on or know-how to fix