Calendar default topic list on subcategories displays Latest

Environment

Discourse Version: 2.4.0.beta8 (d0e191a9d5)

Plugin Commit: 0f2fd7f

Other Plugins
assign, data explorer, user notes, solved, wikimedia auth, locations

Steps to Reproduce

In any subcategory, go to category settings -> appearance -> default topic list, select Calendar and save. It will continue to display Latest.

Example

This subcategory is set on the calendar view.

Logs

No errors in the console.

3 Likes

yes! that’s what I was trying to say in my broken english, here:

trying any subcategory url without the trailing number which i assume is the (sub)category.id doesn’t work (but it works for a category)

2 Likes

This looks like a routing issue

  • the calendar view opens as expected when selecting the subcategory directly from the categories list (on mobile subcategory links are displayed under each category)
  • but it fails when opening the category first and then selecting the subcategory from the dropdown menu
  • yet it is available when manually reselecting the (already selected) Calendar view

There is another related issue:

  • subcategory has “Show an agenda topic list in this category (overrides site setting).” enabled
  • Agenda is available in the view dropdown menu and it displays the agenda view correctly
  • yet in the category settings there is no option in the dropdown to select Agenda as the default view

It is maybe related to these commits


and

partially solved by this one:

@fzngagan @angus
I’m sorry i’m really not familiar enough with github to play with PR
but i think that:
in assets/javascripts/discourse/initializers/event-edits.js.es6
line 239

- return this.replaceWith( `/c/${Discourse.Category.slugFor(model.category)}/l/${this.filter(model.category)}` );

+ return this.replaceWith( `/c/${Discourse.Category.slugFor(model.category)}/${model.category.id}/l/${this.filter(model.category)}` );

might solve one if the issue.

Ps. Maybe i shouldn’t have mentionned you since i assume you read everything? I’m sorry… Belt and suspenders probably :smile:

pps. arghh amateur hour here! forgot to update my development install above 2.4.beta7 :crazy_face:, so… still trying

I’m assigning myself to this so that I can keep track.

1 Like