I upgraded to the latest version today. It works now. Thanks
Thats good to know. You were most certainly facing this issue.
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):
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
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.
Next to the topic name, there are a calendar icon and the date of the event displayed on
/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
Yes. This is reported on our instance. We’ll schedule a fix shortly.
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/ ?
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
so its for performance?
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.
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/.
thanks for your reply @tobiaseigen. we’re heavily promoting tags for user navigation as they are so wonderfully flexible. The main issue is that most plugins and theme components won’t work with them. So yes, its extra flexibility we want to create. Anything users tag posts as would have an attached calendar they can use if they visit the tag page.
You can see that with the Kanban plugin that one of our volunteer Public Happiness Movement devs succeeded in adapting it for tag pages: https://github.com/artysidorenko/discourse-kanban-theme
I’m a pretty basic dev myself, but i wonder if the code @artysidorenko used can be modified to work on this plugin too. Honestly there are so many plugins and theme components that would benefit from also working with tag-pages, i wonder if the core team might want to package a stock solution…
you can enable the plugin not only per category but also system wide. Maybe thats good enough for your usecase.
thanks for your reply. when using a tags for navigation users wouldn’t be in a category to be able to see a calendar or link, and a sitewide all encompassing calendar isn’t sufficient for multiple teams