Bnomei kirby3-feed: "This XML file does not appear to have any style information associated with it. The document tree is shown below."

Hi,

I’m trying to install bnomei’s kirby3-feed but am suddenly encountering this issue. I’m on:

  • Kirby 4
  • ZOON
  • Testing on local

Steps:

  1. I unzipped the folder into site/plugins and renamed kirby3-feed
  2. I added the following to site/config/config.php:
[
            'pattern' => 'feed',
            'method' => 'GET',
            'action'  => function () {
                $options = [
                        'url' => site()->url(),
                        'feedurl' => site()->url() . '/feed/',
                        'title' => 'Feed',
                        'description' => '',
                        'link' => site()->url(),
                        'urlfield' => 'url',
                        'titlefield' => 'title',
                        'datefield' => 'date',
                        'textfield' => 'text',
                        'modified' => time(),
                        'snippet' => 'feed/rss', // 'feed/json', 'feed/atom'
                        'dateformat' => 'r',
                        'mime' => null,
                        'sort' => true,
                ];
                $feed = page('blog')->children()->listed()->flip()->limit(10)->feed($options);
                return $feed;
            }
        ],
  1. I added <link rel="alternate" type="application/rss+xml" title="Latest articles" href="<?= site()->url() ?>/feed"/> between <head> and </head> in site/snippets/head.php

When I go to http://localhost:8080/feed, I get:

<rss version="2.0">
<channel>
<title>Latest articles</title>
<link>http://localhost:8080/blog</link>
<lastBuildDate>Sun, 24 Nov 2024 03:41:17 +0000</lastBuildDate>
<description>Read the latest news about our company</description>
<item>
<title>When nightmares hit too close to reality.</title>
<link>
http://localhost:8080/blog/when-nightmares-hit-too-close-to-reality
</link>
<guid>
http://localhost:8080/blog/when-nightmares-hit-too-close-to-reality
</guid>
<pubDate>Sat, 23 Nov 2024 00:00:00 +0000</pubDate>
<description></description>
</item>
<item>
<title>
Recognize psychological abuse in digital spaces for the hook & bait they are; to distract, dysregulate & divide us.
</title>
<link>
http://localhost:8080/blog/abuse-in-digital-spaces-distract-dysregulate-divide-us
</link>
<guid>
http://localhost:8080/blog/abuse-in-digital-spaces-distract-dysregulate-divide-us
</guid>
<pubDate>Fri, 22 Nov 2024 00:00:00 +0000</pubDate>
<description></description>
</item>
etc.
</channel>
</rss>

With the message This XML file does not appear to have any style information associated with it. The document tree is shown below. on top.

And when I try to subscribe to it in my reader, it doesn’t update with anything.

The weird thing is I got it to work the other day (on an earlier iteration of my site) and I could have sworn I did the same thing then and it updated in my reader.

I appreciate any advice, thanks! :pray:t3:

Edit: In case relevant, I have the following plugins installed:

  • icon
  • icons
  • kirby-cookie-banner
  • kirby3-feed
  • kirby3-redirects
  • resize
  • retour
  • tooltip
  • versions

can you try validating the rss xml output with this and report back? thanks.

W3C Feed Validation Service, for Atom and RSS

So I copied and pasted the following into the Validate by direct input option in that link:

<rss version="2.0">
<channel>
<title>Latest articles</title>
<link>http://localhost:8080/blog</link>
<lastBuildDate>Sun, 24 Nov 2024 03:41:17 +0000</lastBuildDate>
<description>Read the latest news about our company</description>
<item>
<title>When nightmares hit too close to reality.</title>
<link>
http://localhost:8080/blog/when-nightmares-hit-too-close-to-reality
</link>
<guid>
http://localhost:8080/blog/when-nightmares-hit-too-close-to-reality
</guid>
<pubDate>Sat, 23 Nov 2024 00:00:00 +0000</pubDate>
<description></description>
</item>
<item>
<title>
Recognize psychological abuse in digital spaces for the hook & bait they are; to distract, dysregulate & divide us.
</title>
<link>
http://localhost:8080/blog/abuse-in-digital-spaces-distract-dysregulate-divide-us
</link>
<guid>
http://localhost:8080/blog/abuse-in-digital-spaces-distract-dysregulate-divide-us
</guid>
<pubDate>Fri, 22 Nov 2024 00:00:00 +0000</pubDate>
<description></description>
</item>
<item>
<title>Butts gotta shine. PFCs gotta meta.</title>
<link>
http://localhost:8080/blog/butts-gotta-shine-pfcs-gotta-meta
</link>
<guid>
http://localhost:8080/blog/butts-gotta-shine-pfcs-gotta-meta
</guid>
<pubDate>Wed, 20 Nov 2024 00:00:00 +0000</pubDate>
<description></description>
</item>
<item>
<title>
Knowing that everything I choose could be inherently pointless & useless gives clarity to the act of choosing.
</title>
<link>
http://localhost:8080/blog/knowing-everything-i-choose-could-be-inherently-pointless
</link>
<guid>
http://localhost:8080/blog/knowing-everything-i-choose-could-be-inherently-pointless
</guid>
<pubDate>Mon, 18 Nov 2024 00:00:00 +0000</pubDate>
<description></description>
</item>
<item>
<title>
I believe the answer to separateness is not homogeneity; it is heterogeneity, intraconnection & interdependence.
</title>
<link>
http://localhost:8080/blog/answer-to-separateness-is-not-homogeneity
</link>
<guid>
http://localhost:8080/blog/answer-to-separateness-is-not-homogeneity
</guid>
<pubDate>Fri, 15 Nov 2024 00:00:00 +0000</pubDate>
<description></description>
</item>
<item>
<title>This is where I'm going.</title>
<link>http://localhost:8080/blog/this-is-where-im-going</link>
<guid>http://localhost:8080/blog/this-is-where-im-going</guid>
<pubDate>Wed, 13 Nov 2024 00:00:00 +0000</pubDate>
<description></description>
</item>
<item>
<title>
I want to ensure that I do not inadvertently end up only in echo chambers when I join or build communities.
</title>
<link>
http://localhost:8080/blog/not-end-up-in-echo-chambers-when-i-join-communities
</link>
<guid>
http://localhost:8080/blog/not-end-up-in-echo-chambers-when-i-join-communities
</guid>
<pubDate>Mon, 11 Nov 2024 00:00:00 +0000</pubDate>
<description></description>
</item>
<item>
<title>
I refuse to dehumanize those who dehumanize, for once I do, I am no different from them.
</title>
<link>
http://localhost:8080/blog/i-refuse-to-dehumanize-those-who-dehumanize
</link>
<guid>
http://localhost:8080/blog/i-refuse-to-dehumanize-those-who-dehumanize
</guid>
<pubDate>Fri, 08 Nov 2024 00:00:00 +0000</pubDate>
<description></description>
</item>
<item>
<title>Moving into the how.</title>
<link>http://localhost:8080/blog/moving-into-the-how</link>
<guid>http://localhost:8080/blog/moving-into-the-how</guid>
<pubDate>Wed, 06 Nov 2024 00:00:00 +0000</pubDate>
<description></description>
</item>
<item>
<title>
Wherever there is the compulsion to rush in & "save the world", beware the ego wishing to play the saviour.
</title>
<link>
http://localhost:8080/blog/beware-the-ego-wishing-to-play-the-saviour
</link>
<guid>
http://localhost:8080/blog/beware-the-ego-wishing-to-play-the-saviour
</guid>
<pubDate>Mon, 04 Nov 2024 00:00:00 +0000</pubDate>
<description></description>
</item>
</channel>
</rss>

And here are the results:

Sorry

This feed does not validate.

    line 20, column 62: XML parsing error: <unknown>:20:62: not well-formed (invalid token) [help]

        Recognize psychological abuse in digital spaces for the hook & bait they are ...
                                                                      ^

Source:

    <rss version="2.0">
    <channel>
    <title>Latest articles</title>
    <link>http://localhost:8080/blog</link>
    <lastBuildDate>Sun, 24 Nov 2024 03:41:17 +0000</lastBuildDate>
    <description>Read the latest news about our company</description>
    <item>
    <title>When nightmares hit too close to reality.</title>
    <link>
    http://localhost:8080/blog/when-nightmares-hit-too-close-to-reality
    </link>
    <guid>
    http://localhost:8080/blog/when-nightmares-hit-too-close-to-reality
    </guid>
    <pubDate>Sat, 23 Nov 2024 00:00:00 +0000</pubDate>
    <description></description>
    </item>
    <item>
    <title>
    Recognize psychological abuse in digital spaces for the hook & bait they are; to distract, dysregulate & divide us.
    </title>
    <link>
    http://localhost:8080/blog/abuse-in-digital-spaces-distract-dysregulate-divide-us
    </link>
    <guid>
    http://localhost:8080/blog/abuse-in-digital-spaces-distract-dysregulate-divide-us
    </guid>
    <pubDate>Fri, 22 Nov 2024 00:00:00 +0000</pubDate>
    <description></description>
    </item>
    <item>
    <title>Butts gotta shine. PFCs gotta meta.</title>
    <link>
    http://localhost:8080/blog/butts-gotta-shine-pfcs-gotta-meta
    </link>
    <guid>
    http://localhost:8080/blog/butts-gotta-shine-pfcs-gotta-meta
    </guid>
    <pubDate>Wed, 20 Nov 2024 00:00:00 +0000</pubDate>
    <description></description>
    </item>
    <item>
    <title>
    Knowing that everything I choose could be inherently pointless & useless gives clarity to the act of choosing.
    </title>
    <link>
    http://localhost:8080/blog/knowing-everything-i-choose-could-be-inherently-pointless
    </link>
    <guid>
    http://localhost:8080/blog/knowing-everything-i-choose-could-be-inherently-pointless
    </guid>
    <pubDate>Mon, 18 Nov 2024 00:00:00 +0000</pubDate>
    <description></description>
    </item>
    <item>
    <title>
    I believe the answer to separateness is not homogeneity; it is heterogeneity, intraconnection & interdependence.
    </title>
    <link>
    http://localhost:8080/blog/answer-to-separateness-is-not-homogeneity
    </link>
    <guid>
    http://localhost:8080/blog/answer-to-separateness-is-not-homogeneity
    </guid>
    <pubDate>Fri, 15 Nov 2024 00:00:00 +0000</pubDate>
    <description></description>
    </item>
    <item>
    <title>This is where I'm going.</title>
    <link>http://localhost:8080/blog/this-is-where-im-going</link>
    <guid>http://localhost:8080/blog/this-is-where-im-going</guid>
    <pubDate>Wed, 13 Nov 2024 00:00:00 +0000</pubDate>
    <description></description>
    </item>
    <item>
    <title>
    I want to ensure that I do not inadvertently end up only in echo chambers when I join or build communities.
    </title>
    <link>
    http://localhost:8080/blog/not-end-up-in-echo-chambers-when-i-join-communities
    </link>
    <guid>
    http://localhost:8080/blog/not-end-up-in-echo-chambers-when-i-join-communities
    </guid>
    <pubDate>Mon, 11 Nov 2024 00:00:00 +0000</pubDate>
    <description></description>
    </item>
    <item>
    <title>
    I refuse to dehumanize those who dehumanize, for once I do, I am no different from them.
    </title>
    <link>
    http://localhost:8080/blog/i-refuse-to-dehumanize-those-who-dehumanize
    </link>
    <guid>
    http://localhost:8080/blog/i-refuse-to-dehumanize-those-who-dehumanize
    </guid>
    <pubDate>Fri, 08 Nov 2024 00:00:00 +0000</pubDate>
    <description></description>
    </item>
    <item>
    <title>Moving into the how.</title>
    <link>http://localhost:8080/blog/moving-into-the-how</link>
    <guid>http://localhost:8080/blog/moving-into-the-how</guid>
    <pubDate>Wed, 06 Nov 2024 00:00:00 +0000</pubDate>
    <description></description>
    </item>
    <item>
    <title>
    Wherever there is the compulsion to rush in & "save the world", beware the ego wishing to play the saviour.
    </title>
    <link>
    http://localhost:8080/blog/beware-the-ego-wishing-to-play-the-saviour
    </link>
    <guid>
    http://localhost:8080/blog/beware-the-ego-wishing-to-play-the-saviour
    </guid>
    <pubDate>Mon, 04 Nov 2024 00:00:00 +0000</pubDate>
    <description></description>
    </item>
    </channel>
    </rss>

that should not happen as the title is set with Kirby\Toolkit\Xml::encode() for encoding and & should be &amp;. i will have a closer look asap.

1 Like

I don’t know if this extra information will help but what I did was I started a fresh folder of Kirby 4 + ZOON + kirby3-feed, and repeated the same steps I did above to install.

When I check http://localhost:8080/feed, I still get the message This XML file does not appear to have any style information associated with it. The document tree is shown below. and this is what is shown on-screen:

<rss version="2.0">
<channel>
<title>Latest articles</title>
<link>http://localhost:8080/blog</link>
<lastBuildDate>Thu, 26 Sep 2024 15:19:26 +0000</lastBuildDate>
<description>Read the latest news about our company</description>
<item>
<title>Blog Article A</title>
<link>http://localhost:8080/blog/blog-article-a</link>
<guid>http://localhost:8080/blog/blog-article-a</guid>
<pubDate>Mon, 04 Dec 2023 00:00:00 +0000</pubDate>
<description></description>
</item>
<item>
<title>Blog Article B</title>
<link>http://localhost:8080/blog/blog-article-b</link>
<guid>http://localhost:8080/blog/blog-article-b</guid>
<pubDate>Tue, 07 Nov 2023 00:00:00 +0000</pubDate>
<description></description>
</item>
<item>
<title>Blog Article C</title>
<link>http://localhost:8080/blog/blog-article-c</link>
<guid>http://localhost:8080/blog/blog-article-c</guid>
<pubDate>Sat, 07 Oct 2023 00:00:00 +0000</pubDate>
<description></description>
</item>
<item>
<title>Blog Article D</title>
<link>http://localhost:8080/blog/blog-article-d</link>
<guid>http://localhost:8080/blog/blog-article-d</guid>
<pubDate>Thu, 07 Sep 2023 00:00:00 +0000</pubDate>
<description></description>
</item>
<item>
<title>Blog Article E</title>
<link>http://localhost:8080/blog/blog-article-e</link>
<guid>http://localhost:8080/blog/blog-article-e</guid>
<pubDate>Mon, 07 Aug 2023 00:00:00 +0000</pubDate>
<description></description>
</item>
<item>
<title>Blog Article F</title>
<link>http://localhost:8080/blog/blog-article-f</link>
<guid>http://localhost:8080/blog/blog-article-f</guid>
<pubDate>Fri, 07 Jul 2023 00:00:00 +0000</pubDate>
<description></description>
</item>
</channel>
</rss>

And when I try to add it to my reader, the feed doesn’t update. These are the default posts that come with ZOON.

However, when I run it through the direct input validator, it says:

Congratulations!

    [Valid RSS] This is a valid RSS feed.

Recommendations

This feed is valid, but interoperability with the widest range of feed readers could be improved by implementing the following recommendations.

    line 49, column 0: Missing atom:link with rel="self" [help]

        </channel>

Source:

    <rss version="2.0">
    <channel>
    <title>Latest articles</title>
    <link>http://localhost:8080/blog</link>
    <lastBuildDate>Thu, 26 Sep 2024 15:19:26 +0000</lastBuildDate>
    <description>Read the latest news about our company</description>
    <item>
    <title>Blog Article A</title>
    <link>http://localhost:8080/blog/blog-article-a</link>
    <guid>http://localhost:8080/blog/blog-article-a</guid>
    <pubDate>Mon, 04 Dec 2023 00:00:00 +0000</pubDate>
    <description></description>
    </item>
    <item>
    <title>Blog Article B</title>
    <link>http://localhost:8080/blog/blog-article-b</link>
    <guid>http://localhost:8080/blog/blog-article-b</guid>
    <pubDate>Tue, 07 Nov 2023 00:00:00 +0000</pubDate>
    <description></description>
    </item>
    <item>
    <title>Blog Article C</title>
    <link>http://localhost:8080/blog/blog-article-c</link>
    <guid>http://localhost:8080/blog/blog-article-c</guid>
    <pubDate>Sat, 07 Oct 2023 00:00:00 +0000</pubDate>
    <description></description>
    </item>
    <item>
    <title>Blog Article D</title>
    <link>http://localhost:8080/blog/blog-article-d</link>
    <guid>http://localhost:8080/blog/blog-article-d</guid>
    <pubDate>Thu, 07 Sep 2023 00:00:00 +0000</pubDate>
    <description></description>
    </item>
    <item>
    <title>Blog Article E</title>
    <link>http://localhost:8080/blog/blog-article-e</link>
    <guid>http://localhost:8080/blog/blog-article-e</guid>
    <pubDate>Mon, 07 Aug 2023 00:00:00 +0000</pubDate>
    <description></description>
    </item>
    <item>
    <title>Blog Article F</title>
    <link>http://localhost:8080/blog/blog-article-f</link>
    <guid>http://localhost:8080/blog/blog-article-f</guid>
    <pubDate>Fri, 07 Jul 2023 00:00:00 +0000</pubDate>
    <description></description>
    </item>
    </channel>
    </rss>

I tested with a local setup, and both channel and item title properly escaped when pulled from Kirby. & in any content TXT files becomes &#38; in the outputted XML string. I do not know the reason why that would fail for your setup.

You could directly add code to the site/plugins/kirby3-feed/snippets/rss.php trying to debug this further.

I finally got around to downloading a fresh copy of everything, including ZOON and the latest version of your plugin today, and repeated everything and now it works. Maybe you updated something that fixed whatever problem I was running into; if so thank you! :pray:t3:

1 Like