diff options
| author | erdgeist <erdgeist@erdgeist.org> | 2026-07-31 13:43:13 +0200 |
|---|---|---|
| committer | erdgeist <erdgeist@erdgeist.org> | 2026-07-31 13:43:13 +0200 |
| commit | de21b8622702adb7036babc88c4f6cfa62576161 (patch) | |
| tree | 16765ff1ed2805552adf6dc98dccbce0b16e5bed /app/helpers | |
| parent | 7bd2525fa936e117abd7503844c9dab73d87de1a (diff) | |
Let shortcode aggregate log but remove failed shortcode itself
Diffstat (limited to 'app/helpers')
| -rw-r--r-- | app/helpers/content_helper.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/helpers/content_helper.rb b/app/helpers/content_helper.rb index fd351ed2..935ed7b8 100644 --- a/app/helpers/content_helper.rb +++ b/app/helpers/content_helper.rb | |||
| @@ -124,7 +124,11 @@ module ContentHelper | |||
| 124 | end | 124 | end |
| 125 | 125 | ||
| 126 | rescue | 126 | rescue |
| 127 | sanitize(content, :attributes => cccms_attributes) | 127 | Rails.logger.error("aggregate shortcode failed on page #{@page&.id}: #{e.class}: #{e.message}") |
| 128 | fallback = content.sub(/\[aggregate[^\]]*\]/, "") | ||
| 129 | fallback = sanitize(fallback, :attributes => cccms_attributes) | ||
| 130 | fallback += content_tag(:p, t("content.aggregate_failed"), :class => "error_messages") if current_user | ||
| 131 | fallback | ||
| 128 | end | 132 | end |
| 129 | end | 133 | end |
| 130 | 134 | ||
