From dec280973934be536273a110d2e368270f627d20 Mon Sep 17 00:00:00 2001 From: Jeremy Gonyea Date: Thu, 21 Jan 2021 13:09:30 -0500 Subject: [PATCH] Fix for 0byte sized feeds when using multi-language settings --- CHANGELOG.md | 10 ++++++++++ blueprints.yaml | 8 ++++---- languages.yaml | 4 ++-- templates/feed.rss.twig | 4 ++-- templates/podcast-channel.html.twig | 2 +- templates/podcast-series.html.twig | 4 ++-- 6 files changed, 21 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d323bcd..7c6e107 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,13 @@ +# v2.1.10 +## 01/21/2021 + +1. [](#new) + +2. [](#improved) + * Changed some more settings in the plugin blueprint to utilize the core's ML labels. +3. [](#bugfix) + * Fixes for 0byte sized feeds for RSS feeds by using `page.template` vs `page.name` + # v2.1.9 ## 01/20/2021 diff --git a/blueprints.yaml b/blueprints.yaml index 78ef22f..b8019db 100644 --- a/blueprints.yaml +++ b/blueprints.yaml @@ -1,5 +1,5 @@ name: Podcast -version: 2.1.9 +version: 2.1.10 description: Creates Podcast page types and related podcast RSS feeds icon: microphone author: @@ -21,12 +21,12 @@ form: fields: enabled: type: toggle - label: Plugin status + label: PLUGIN_ADMIN.PLUGIN_STATUS highlight: 1 default: 0 options: - 1: Enabled - 0: Disabled + 1: PLUGIN_ADMIN.ENABLED + 0: PLUGIN_ADMIN.DISABLED validate: type: bool max_upload: diff --git a/languages.yaml b/languages.yaml index cb37553..b012f36 100644 --- a/languages.yaml +++ b/languages.yaml @@ -3,5 +3,5 @@ en: CONFIG: MAX_UPLOAD_LABEL: Max Podcast Filesize (MB) MAX_UPLOAD_HELP: 'Set "upload_max_filesize" and "post_max_size" in php.ini to at least this value or higher.' - PODCAST: Podcast - SERIES: Series \ No newline at end of file + PODCAST: Podcast Channel + SERIES: Podcast Series \ No newline at end of file diff --git a/templates/feed.rss.twig b/templates/feed.rss.twig index 2d0c1b2..c60c76e 100644 --- a/templates/feed.rss.twig +++ b/templates/feed.rss.twig @@ -1,7 +1,7 @@ {# Need to find if we're at the channel or a series page #} -{% if page.name == 'podcast-channel.md' %} +{% if page.template == 'podcast-channel' %} {% set channel = page %} -{% elseif page.name == 'podcast-series.md' %} +{% elseif page.template == 'podcast-series' %} {% set channel = page.parent %} {% endif %} {% if channel %} diff --git a/templates/podcast-channel.html.twig b/templates/podcast-channel.html.twig index 79e4ac1..3bc4744 100644 --- a/templates/podcast-channel.html.twig +++ b/templates/podcast-channel.html.twig @@ -17,7 +17,7 @@

{{page.header.podcast.description}}

diff --git a/templates/podcast-series.html.twig b/templates/podcast-series.html.twig index 58b32f2..486716d 100644 --- a/templates/podcast-series.html.twig +++ b/templates/podcast-series.html.twig @@ -17,7 +17,7 @@

{{ page.parent.header.title }} - {{header.title}}

-

by {{ page.parent.header.podcast.itunes.owner.name}}

+

by {{ page.parent.header.podcast.itunes.owner.name }}

{% if not page.content %} {% set description = page.parent.header.podcast.description %} {% else %} @@ -26,7 +26,7 @@

{{ description }}