New Topic URL shortcut not working from `/latest` route

/new-topic used to work perfectly with Tab-Bar component in mobile. But after the Discourse 2.3 beta 5 update, it stopped working (or rather it stopped working from a lot of routes). I notified Osama for this at the Tab Bar component topic and also exchanged a few messages about it. So the issue happened in Ember >= 3.7.0

https://github.com/discourse/discourse/blob/aec457e09a019edab7d28237df6100236457755a/app/assets/javascripts/discourse/routes/new-topic.js.es6#L58-L70

“Then” should be getting executed in line 58 but due to some reason, it’s aborting that part. Can someone tell how this can be solved and /new-topic be fixed again to work in mobile with Tab-Bar?

3 Likes

This turned out to be a more general problem. Any links to /new-topic from /latest would fail. That includes links from theme components, global notices, or banner topics. The issue should now be fixed, following:

https://github.com/discourse/discourse/commit/583226d295ea10ec548d52ac3fc3d7e99628c2eb

@thegurjyot please can you confirm that this fixes the problem for you? The fix should hit tests-passed in the next few minutes.

7 Likes

Yep, that’s exactly the bug I’ve fixed. Unfortunately the fix didn’t quite make it to tests-passed yet, but I’ll update here when it does.

Edit: it’s in tests-passed now

8 Likes

I just updated the website to the latest version and this problem seems to be fixed. Thanks a lot @david for this fix. :slight_smile:

4 Likes

Awesome, it works! Question: is it supposed to redirect you to the homepage and then prompt the composer?

Yes, it should direct to /latest. If you specify a category in the link, then it will direct you to the latest page for that specific category.

5 Likes

This topic was automatically closed after 22 hours. New replies are no longer allowed.