diff options
| -rw-r--r-- | app/helpers/content_helper.rb | 6 | ||||
| -rw-r--r-- | config/locales/de.yml | 1 | ||||
| -rw-r--r-- | config/locales/en.yml | 1 |
3 files changed, 7 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 | ||
diff --git a/config/locales/de.yml b/config/locales/de.yml index 521aca8b..6cf32831 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml | |||
| @@ -163,6 +163,7 @@ de: | |||
| 163 | title: "Termine" | 163 | title: "Termine" |
| 164 | tags: | 164 | tags: |
| 165 | title: "Tags" | 165 | title: "Tags" |
| 166 | aggregate_failed: "Fehler: Der [aggregate]-Shortcode auf dieser Seite konnte nicht ausgeführt werden." | ||
| 166 | 167 | ||
| 167 | search: | 168 | search: |
| 168 | index: | 169 | index: |
diff --git a/config/locales/en.yml b/config/locales/en.yml index 9bf51262..fbb683ce 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml | |||
| @@ -110,6 +110,7 @@ en: | |||
| 110 | title: "Calendar" | 110 | title: "Calendar" |
| 111 | tags: | 111 | tags: |
| 112 | title: "Tags" | 112 | title: "Tags" |
| 113 | aggregate_failed: "Error: the [aggregate] shortcode on this page could not be evaluated." | ||
| 113 | 114 | ||
| 114 | search: | 115 | search: |
| 115 | index: | 116 | index: |
