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:
Robin Ward 2017-11-21 16:13:09 -05:00
parent be34b796ea
commit 8d98752b57
2 changed files with 8 additions and 0 deletions

View File

@ -596,6 +596,11 @@ class ApplicationController < ActionController::Base
end
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
@container_class = "wrap not-found-container"
@top_viewed = TopicQuery.new(nil, except_topic_ids: category_topic_ids).list_top_for("monthly").topics.first(10)

View File

@ -1103,6 +1103,9 @@ developer:
choices:
- 'default'
- 'lograge'
bootstrap_error_pages:
hidden: true
default: false
embedding:
feed_polling_enabled: