mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Preserve preview_theme_id param on topic redirects (#23965)
Why this change?
When the URL `/t/1234?preview_theme_id=21` is loaded, we redirect to
`/t/<topic slug>/1234` stripping the `preview_theme_id` query params.
What does this change do?
This change builds on 61248652cd and
simply adds the `preview_theme_id` query param when redirecting.
This commit is contained in:
committed by
GitHub
parent
788651467b
commit
b4eb078b0e
@@ -1253,7 +1253,7 @@ class TopicsController < ApplicationController
|
||||
raise(SiteSetting.detailed_404 ? ex : Discourse::NotFound)
|
||||
end
|
||||
|
||||
opts = params.slice(:page, :print, :filter_top_level_replies)
|
||||
opts = params.slice(:page, :print, :filter_top_level_replies, :preview_theme_id)
|
||||
opts.delete(:page) if params[:page] == 0
|
||||
|
||||
url = topic.relative_url
|
||||
|
||||
Reference in New Issue
Block a user