From 0f7aaf5ab19f593416a0012f223e2f91e6cb0329 Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Tue, 29 Sep 2015 17:22:28 -0400 Subject: [PATCH] Revert "FIX: paginated category and topic pages should not have canonical tag" This reverts commit ecd93f7efb98c41e79077d025c2215c98f1c912d. --- app/controllers/list_controller.rb | 4 ++-- app/controllers/topics_controller.rb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controllers/list_controller.rb b/app/controllers/list_controller.rb index 2fdb8fb1d59..bea88a69e62 100644 --- a/app/controllers/list_controller.rb +++ b/app/controllers/list_controller.rb @@ -84,7 +84,7 @@ class ListController < ApplicationController end define_method("category_#{filter}") do - canonical_url "#{Discourse.base_url}#{@category.url}" unless params[:page].present? + canonical_url "#{Discourse.base_url}#{@category.url}" self.send(filter, category: @category.id) end @@ -93,7 +93,7 @@ class ListController < ApplicationController end define_method("parent_category_category_#{filter}") do - canonical_url "#{Discourse.base_url}#{@category.url}" unless params[:page].present? + canonical_url "#{Discourse.base_url}#{@category.url}" self.send(filter, category: @category.id) end diff --git a/app/controllers/topics_controller.rb b/app/controllers/topics_controller.rb index c1807ad3a66..d139479de09 100644 --- a/app/controllers/topics_controller.rb +++ b/app/controllers/topics_controller.rb @@ -83,7 +83,7 @@ class TopicsController < ApplicationController response.headers['X-Robots-Tag'] = 'noindex' end - canonical_url UrlHelper.absolute_without_cdn("#{Discourse.base_uri}#{@topic_view.canonical_path}") unless params[:page].present? + canonical_url UrlHelper.absolute_without_cdn("#{Discourse.base_uri}#{@topic_view.canonical_path}") perform_show_response