diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 05fbfdb733d..1fd3d2fc9c2 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -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) diff --git a/config/site_settings.yml b/config/site_settings.yml index 142aea9470a..143e039eb0d 100644 --- a/config/site_settings.yml +++ b/config/site_settings.yml @@ -1103,6 +1103,9 @@ developer: choices: - 'default' - 'lograge' + bootstrap_error_pages: + hidden: true + default: false embedding: feed_polling_enabled: