discourse/app
Osama Sayegh a742952c8d
FIX: Client should be able to route ID-less topic URLs (#15697)
The topic ID portion of the topic URL is optional in Discourse as long as the topic slug is unique across the site. If you navigate to a topic without the ID in the URL, Discourse will redirect you to the canonical version of the URL that includes the ID.

However, we have a now regression where the client app doesn't correctly handle ID-less topic URLs displays an error message when the user clicks on such URL. The regression was introduced b537d591b3 when we switched from `DiscourseURL.routeTo` to using Ember's router to perform the redirecting to the canonical version of the URL, but the problem is that the canonical version comes from the server and it contains the hostname which the Ember router doesn't understand because it expects a relative URL.

This PR fixes the problem by constructing a relative URL that contains the topic slug and ID and passing that to the Ember route.
2022-01-24 23:19:35 +03:00
..
assets FIX: Client should be able to route ID-less topic URLs (#15697) 2022-01-24 23:19:35 +03:00
controllers FIX: Prefer email when resetting password (#15650) 2022-01-20 10:04:45 +02:00
helpers DEV: Support for running theme test with Ember CLI (third attempt) 2022-01-13 16:02:07 -05:00
jobs DEV: Fix methods removed in Ruby 3.2 (#15459) 2022-01-05 18:45:08 +01:00
mailers DEV: Hash tokens stored from email_tokens (#14493) 2021-11-25 09:34:39 +02:00
models FIX: Improve top links section from user summary (#15675) 2022-01-24 11:33:23 +11:00
serializers UX: change text of public_topic action code in login required sites. (#14764) 2022-01-11 11:35:16 +05:30
services FIX: Single line emojis has emoji metadata indexed twice. 2022-01-24 14:03:17 +08:00
views DEV: Support for running theme test with Ember CLI (third attempt) 2022-01-13 16:02:07 -05:00