A podcast feed in v3

Thanks for looking into this post! I am super new to Statamic, just got a license and thought it would be smart to start with v3 right away. My php skills are really limited I guess. So I was trying to get a mini podcast website up including the feed for it. And that is where things did not work anymore.

What I have

  • a clean v3 install latest version / beta38
  • a few simple templates, blueprints, and layouts
  • two routes


use Illuminate\Support\Facades\Route;
Route::statamic('episodes', 'episodes/index');
Route::statamic('podcastfeed', 'episodes/feed', [
  'layout' => 'rss' ,
  'content_type' => 'atom']


title: Episode
    display: Main
        handle: episode_subtitle
          input_type: text
          type: text
          localizable: false
          listable: hidden
          display: Subtitle
        handle: episode_cover
          mode: grid
          restrict: false
          allow_uploads: true
          max_files: 1
          type: assets
          localizable: false
          listable: hidden
          display: Cover
        handle: episode_language
            de: 'German'
            en: 'English'
          inline: true
          type: radio
          localizable: false
          listable: hidden
          display: Language
        handle: episode_season
          type: integer
          localizable: false
          listable: hidden
          display: Season
          width: 33
        handle: episode_number
          type: integer
          localizable: false
          listable: hidden
          display: Episode
          width: 33
        handle: episode_length
          input_type: number
          type: text
          instructions: 'In seconds'
          localizable: false
          listable: hidden
          display: Length
          width: 33
        handle: episode_recording_date
          mode: single
          time_enabled: false
          time_required: false
          earliest_date: '2020-07-01'
          full_width: false
          inline: true
          columns: 1
          rows: 1
          type: date
          localizable: false
          listable: hidden
          display: 'Recording date'
        handle: episode_mp3_url
          type: link
          localizable: false
          listable: hidden
          display: 'MP3 URL'
    display: Content
        handle: episode_intro
          type: textarea
          localizable: false
          listable: hidden
          display: Intro
        handle: episode_shownotes
            - h2
            - h3
            - bold
            - unorderedlist
            - orderedlist
            - removeformat
            - quote
            - anchor
            - image
          save_html: false
          toolbar_mode: fixed
          link_noopener: false
          link_noreferrer: false
          target_blank: false
          reading_time: false
          fullscreen: true
          allow_source: true
          type: bard
          localizable: false
          listable: hidden
          display: Shownotes


title: Episodes
amp: true
template: episodes/show
layout: layout
  - episode
revisions: false
route: '/episodes/s-{episode_season}-e-{episode_number}-{slug}'
date: true
sort_dir: asc
  past: public
  future: private


{{ content }}
    Season 1, 2, 3
    {{ collection:episodes sort="episode_season:desc"
        <a href="{{ url }}">{{ title }} s {{ episode_season}} e {{episode_number}}</a>
    {{ /collection:episodes }}


<span class="number">
  Season {{ episode_season }} · Episode {{ episode_number }}
  {{ title }}
<span class="language language-{{ episode_language }}"></span>
<p class="intro">
  {{ episode_subtitle}}
  {{ episode_cover }}
    <img src="{{ url }}" alt="{{ alt }}" width=200>
  {{ /episode_cover }}
<p class="date">
  Recording date: {{ episode_recording_date }} · Duration: {{ episode_length }}
<p class="intro">
  {{ episode_intro }}
<div class="shownotes">
  {{ episode_shownotes}}


<rss version="2.0">
    {{ get_content from="/episodes" }}
        <title>{{ title | cdata }}</title>
        <link>{{ site_url }}</link>
        <description>{{ content | cdata }}</description>
    {{ /get_content }}
    <lastBuildDate>{{ collection:episodes limit="1" }}{{ date format="r" }}{{ /collection:episodes }}</lastBuildDate>
    <copyright>Copyright {{ current_date format='Y' }}</copyright>
    {{ collection:episodes }}
        <title>{{ title | cdata }}</title>
        <link>{{ permalink }}</link>
        <guid>{{ permalink }}</guid>
        <pubDate>{{ date format="r" }}</pubDate>
        <description>{{ content | full_urls | cdata }}</description>
    {{ /collection:episodes }}


{{ xml_header }}
{{ layout_content }}

Now, calling the index at /episodes works fine. A click on the episode opens the detail view as well. Nice. But the feed is giving me a hard time. On the forum I found an example but that is v2 code and since routes etc. have changed a bit I am sure I am missing something here.

Now when I request /podcastfeed in the browser I get

ErrorException array_merge(): Expected parameter 1 to be an array, null given

I am not sure which other data to share to help understanding this. Just let me know and I will try to fill in any gaps.

Environment information

  • Laravel version = 7.20.0
  • Laravel locale = en
  • Laravel config cached = false
  • PHP version = 7.4.1

Maybe you can help me and point me at any resource or where I am totally missing what is going on. The lack of a demo for v3 and a working feed in it makes it hard to understand and work based on it.

Maybe the https://www.youtube.com/watch?v=-cLzCWu-DeE / https://github.com/statamic/starter-kit-doogie-browser could use a feed template to learn how v3 needs things served up.

Really appreciate any help or pointing in the right direction. Thanks a bunch :)

>>>>>>> Unanswered <<<<<<<
1 Reply
1 Follower