mirror of
https://github.com/discourse/discourse.git
synced 2025-02-20 11:48:26 -06:00
Allow sites to bootstrap the error page.
This will display working dropdowns and such even if the page is a 404.
This commit is contained in:
parent
be34b796ea
commit
8d98752b57
@ -596,6 +596,11 @@ class ApplicationController < ActionController::Base
|
|||||||
end
|
end
|
||||||
|
|
||||||
def build_not_found_page(status = 404, layout = false)
|
def build_not_found_page(status = 404, layout = false)
|
||||||
|
if SiteSetting.bootstrap_error_pages?
|
||||||
|
preload_json
|
||||||
|
layout = 'application' if layout == 'no_ember'
|
||||||
|
end
|
||||||
|
|
||||||
category_topic_ids = Category.pluck(:topic_id).compact
|
category_topic_ids = Category.pluck(:topic_id).compact
|
||||||
@container_class = "wrap not-found-container"
|
@container_class = "wrap not-found-container"
|
||||||
@top_viewed = TopicQuery.new(nil, except_topic_ids: category_topic_ids).list_top_for("monthly").topics.first(10)
|
@top_viewed = TopicQuery.new(nil, except_topic_ids: category_topic_ids).list_top_for("monthly").topics.first(10)
|
||||||
|
@ -1103,6 +1103,9 @@ developer:
|
|||||||
choices:
|
choices:
|
||||||
- 'default'
|
- 'default'
|
||||||
- 'lograge'
|
- 'lograge'
|
||||||
|
bootstrap_error_pages:
|
||||||
|
hidden: true
|
||||||
|
default: false
|
||||||
|
|
||||||
embedding:
|
embedding:
|
||||||
feed_polling_enabled:
|
feed_polling_enabled:
|
||||||
|
Loading…
Reference in New Issue
Block a user