summaryrefslogtreecommitdiff
path: root/app/helpers
diff options
context:
space:
mode:
authorerdgeist <erdgeist@erdgeist.org>2026-07-31 18:55:35 +0200
committererdgeist <erdgeist@erdgeist.org>2026-07-31 18:55:35 +0200
commit683526b38442a9873d83a542b5cba1d15efc14d5 (patch)
tree5cdf7d762d829d328e3c6437318d20af72bc65bf /app/helpers
parent464af1625349d557f688da9f845471ef8b80a5f9 (diff)
Bind aggregates over scoped tags to their subtree
CccConventions::TAG_SCOPES maps "update" and "pressemitteilung" to /updates and "disclosure" to /disclosure. Page.aggregate applies the mapping, so an aggregate over one of those tags is bounded by its subtree regardless of what the shortcode says. Tags stay unrestricted; positions are publish-gated. Both RSS actions call Page.aggregate rather than repeating its tag join. Empty feeds no longer crash: Atom falls back to the current time for the required <updated>, and the optional dc:date is omitted.
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/content_helper.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/helpers/content_helper.rb b/app/helpers/content_helper.rb
index 57f8c960..9d52c110 100644
--- a/app/helpers/content_helper.rb
+++ b/app/helpers/content_helper.rb
@@ -123,7 +123,7 @@ module ContentHelper
123 sanitize(content, :attributes => cccms_attributes) 123 sanitize(content, :attributes => cccms_attributes)
124 end 124 end
125 125
126 rescue 126 rescue => e
127 Rails.logger.error("aggregate shortcode failed on page #{@page&.id}: #{e.class}: #{e.message}") 127 Rails.logger.error("aggregate shortcode failed on page #{@page&.id}: #{e.class}: #{e.message}")
128 fallback = content.sub(/\[aggregate[^\]]*\]/, "") 128 fallback = content.sub(/\[aggregate[^\]]*\]/, "")
129 fallback = sanitize(fallback, :attributes => cccms_attributes) 129 fallback = sanitize(fallback, :attributes => cccms_attributes)