mirror of
https://github.com/discourse/discourse.git
synced 2025-06-07 13:06:44 +08:00
FIX: web crawlers getting 404 on category pages
This commit is contained in:
@ -79,8 +79,8 @@ class ListController < ApplicationController
|
|||||||
# Note the first is the default and we don't add a title
|
# Note the first is the default and we don't add a title
|
||||||
if (filter.to_s != current_homepage) && use_crawler_layout?
|
if (filter.to_s != current_homepage) && use_crawler_layout?
|
||||||
filter_title = I18n.t("js.filters.#{filter.to_s}.title", count: 0)
|
filter_title = I18n.t("js.filters.#{filter.to_s}.title", count: 0)
|
||||||
if list_opts[:category]
|
if list_opts[:category] && @category
|
||||||
@title = I18n.t('js.filters.with_category', filter: filter_title, category: Category.find(list_opts[:category]).name)
|
@title = I18n.t('js.filters.with_category', filter: filter_title, category: @category.name)
|
||||||
else
|
else
|
||||||
@title = I18n.t('js.filters.with_topics', filter: filter_title)
|
@title = I18n.t('js.filters.with_topics', filter: filter_title)
|
||||||
end
|
end
|
||||||
|
Reference in New Issue
Block a user