Events Plugin 📆

I tried, but still failed.

1 Like

@Bishan_Kanfang
can you file a bug report here
https://thepavilion.io/w/bug-report/

Hey guys, We’ve updated the description of the plugin. We’re featuring the instances which use the Events plugin on the OP. If you use the Events plugin on your site and wish to get it featured, just PM me or @angus here on meta with your site’s link.

2 Likes

I upgraded to the latest version today. It works now. Thanks

1 Like

Thats good to know. You were most certainly facing this issue.

1 Like

Hi everyone,

I’ve been experiencing for approximately one month a bug that I can’t replicate but that I don’t know how to solve either.
On one of the instance I’m managing, the Agenda page is sorted by activity date rather than the event date.
I am using these other plugins (but I don’t think they are involved in any way since I use the same ones for other instances):

Plugins

discourse-checklist 0.4.1 O
discourse-custom-wizard 0.1 O
discourse-data-explorer 0.2 O
discourse-events 0.1 O
discourse-footnote 0.1 O
discourse-locations 0.1 O
discourse-math 0.9 N
discourse-quick-messages 0.1 N
discourse-sidebar-categories 0.1 O
discourse-solved 0.1 O
discourse-whos-online 1.0 O
docker_manager 0.1 O

Does any one of you have a hint of a config problem, or something I might have done that would have broken it, or some place I should ckeck to diagnose the problem ?

More details or access to the instance via MP.

Thanks in advance

1 Like

Thanks for the report.
Please click on report a bug link on the first post of this topic and fill the form with relevant details. That way it’ll become easy for us to schedule an appropriate time to look into the issue.

2 Likes

Hi everyone,

Next to the topic name, there are a calendar icon and the date of the event displayed on /latest, /top, /unread or /agenda pages. They are not displayed on the <Category + Latest> page, nor on mobile.

Is there a setting to add them there ? (I could not find it)
If not, can anyone see a dirty hack I could use to make it happen, for example by copy-pasting something on the plugin code for /latest enable it on /categories ? (even if that would become cluttered, I’ll find a way with CSS to make it not that horrible)

Thanks in advance

1 Like

Yes. This is reported on our instance. We’ll schedule a fix shortly.

2 Likes

https://github.com/paviliondev/discourse-events/blob/3135b10525b528648c5ac26ee51aee5cbff6ec31/assets/javascripts/discourse/connectors/edit-topic/topic-controls-event.js.es6#L16

      if (this._state === 'destroying') return;

can you tell me what the purpose of this line of code in the ember observer is? Does it relate to the Lifecycle of ember components: https://guides.emberjs.com/release/components/the-component-lifecycle/ ?

1 Like

Yes. You can actually print it in the console and see its value during different lifecycle events.

Ok so whats the purpose of just returning, when the state is ‘destroying’ ? what would happen if we omit this line?

To prevent the next two statements from getting executed because those would become unnecessary :slight_smile:

so its for performance?

1 Like

It would be worth doing even if there was no performance gain. Why would you want to run a bunch of statements which have no use in a particular case?

Now that I thought about it and did some research, there’s a proper word fall it called return early pattern for functions.


I did some more digging. I set a breakpoint on the line and then executed the statements. Its not just unnecessary to execute them, it actually leads to an error.

1 Like

I said unnecessary but yeah, it would also throw an error. If you’re interested, you can have a look at ember-concurrency which gives out of the box solution to tackle these kind of situations. It isn’t included in discourse core yet though.

So if it was used, this case would be taken care of, by the library itself.

I just watched this talk while learning about observers vs computed properties:


Can you explain why an observer was used in this case, instead of a computed property?
I am trying to understand the trade offs and different use cases.

Can this be made to work on tags/tag pages?

What is the functionality you are wanting on tags/tag pages? Events plugin mostly affects topics, but categories also can get a calendar and agenda view of event topics within the category. Are you suggesting providing an agenda view of tagged event topics? That might be interesting to look at, e.g. to display all events tagged by a country. That would be pretty cool! But it is not on the roadmap as of now as far as I know. You could request the feature at https://thepavilion.io/.

2 Likes