mirror of
https://github.com/discourse/discourse.git
synced 2025-09-04 08:47:37 +08:00
FIX: Allow 404 pages to use the current theme
This commit is contained in:
parent
dffdff91a6
commit
a3e5a31674
1 changed files with 2 additions and 0 deletions
|
@ -192,7 +192,9 @@ class ApplicationController < ActionController::Base
|
||||||
render_json_error message, type: type, status: status_code
|
render_json_error message, type: type, status: status_code
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
|
# 404 pages won't have the session and theme_keys without these:
|
||||||
current_user
|
current_user
|
||||||
|
handle_theme
|
||||||
rescue Discourse::InvalidAccess
|
rescue Discourse::InvalidAccess
|
||||||
return render plain: message, status: status_code
|
return render plain: message, status: status_code
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue