Skip to content

Commit

Permalink
Fix for 0byte sized feeds when using multi-language settings
Browse files Browse the repository at this point in the history
  • Loading branch information
jgonyea committed Jan 21, 2021
1 parent 9630842 commit dec2809
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 11 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down
8 changes: 4 additions & 4 deletions blueprints.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions languages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
PODCAST: Podcast Channel
SERIES: Podcast Series
4 changes: 2 additions & 2 deletions templates/feed.rss.twig
Original file line number Diff line number Diff line change
@@ -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 %}
Expand Down
2 changes: 1 addition & 1 deletion templates/podcast-channel.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<p class = "description">{{page.header.podcast.description}}</p>
</div>
<div class="channel-links">
<a href="{{base_url}}{{page.route}}.rss"><i class="fa fa-rss" aria-hidden="true"></i> {{page.title}} {{ 'PLUGIN_PODCAST.PODCAST'|t }}</a>
<a href="{{base_url}}{{page.route}}.rss"><i class="fa fa-rss" aria-hidden="true"></i>{{ 'PLUGIN_PODCAST.PODCAST'|t }} | {{page.title}}</a>

</div>

Expand Down
4 changes: 2 additions & 2 deletions templates/podcast-series.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
</div>
<div class="channel-meta">
<h1>{{ page.parent.header.title }} - {{header.title}}</h1>
<p class = "owner">by {{ page.parent.header.podcast.itunes.owner.name}}</p>
<p class = "owner">by {{ page.parent.header.podcast.itunes.owner.name }}</p>
{% if not page.content %}
{% set description = page.parent.header.podcast.description %}
{% else %}
Expand All @@ -26,7 +26,7 @@
<p class = "description">{{ description }}</p>
</div>
<div class="channel-links">
<a href="{{base_url}}{{page.route}}.rss"><i class="fa fa-rss" aria-hidden="true"></i> {{page.title}} {{ 'PLUGIN_PODCAST.PODCAST'|t }}</a>
<a href="{{ base_url }}{{ page.route }}.rss"><i class="fa fa-rss" aria-hidden="true"></i>{{ 'PLUGIN_PODCAST.SERIES'|t }} | {{ page.title }}</a>

</div>

Expand Down

0 comments on commit dec2809

Please sign in to comment.