Skip to content

A platform for community discussion. Free, open, simple.

FIX: Ensure sitemaps include all topics with no duplicates (#26289)

David Taylor4e082c739027
diff --git a/app/models/sitemap.rb b/app/models/sitemap.rb
index a0ca9a6df26..a051c4885fe 100644
--- a/app/models/sitemap.rb
+++ b/app/models/sitemap.rb
@@ -62,7 +62,7 @@ class Sitemap < ActiveRecord::Base
else
offset = (name.to_i - 1) * max_page_size
- indexable_topics.limit(max_page_size).offset(offset)
+ indexable_topics.order(id: :asc).limit(max_page_size).offset(offset)
end
end
end