Skip to content

[BUG] Cant run RSS Feed locally with PHP #1923

@grrstu

Description

@grrstu

Environment

Self-Hosted (Bare Metal)

System

Debian 12

Version

3.1.1

Describe the problem

Hello,

Dashy is running smoothly on an Debian Machine locally.
But for some Reason, I cant get my Feed to work.

Im using some Code with PHP Inputs from a Website, so I can dynamic update the Feed.

This is the php output:

<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>Meine RSS Nachrichten</title>
    <link>http://domain.local/feed.php</link>
    <description>RSS-Feed</description>
    <lastBuildDate>Tue, 23 Sep 2025 08:13:13 +0000</lastBuildDate>

      <item>
      <title>Green Test News</title>
      <link>http://domain.local/feed.php/?id=4</link>
      <description>Testinput</description>
      <pubDate>Mon, 22 Sep 2025 10:21:57 +0000</pubDate>
      <guid>http://domain.local/feed.php/?id=4</guid>
       </item>
      </channel>
</rss>

And this is the backbone of the php:

echo '<?xml version="1.0" encoding="UTF-8"?>' . "\n";
?>
<rss version="2.0">
  <channel>
    <title>Meine RSS Nachrichten</title>
    <link><?= htmlspecialchars($base . '/feed.php') ?></link>
    <description>RSS-Feed</description>
    <lastBuildDate><?= gmdate(DATE_RSS) ?></lastBuildDate>

    <?php foreach($items as $it): 
        // Ampelstatus-Icon
        $status_icon = match($it['status'] ?? 'green') {
            'red' => 'Red',
            'yellow' => 'Yellow',
            'green' => 'Green',
            default => 'Green'
        };
    ?>
    <item>
      <title><?= htmlspecialchars($status_icon . ' ' . $it['title']) ?></title>
      <link><?= htmlspecialchars($base . '/feed.php#news-' . $it['id']) ?></link>
      <description><![CDATA[<?= ($it['summary'] ? htmlspecialchars($it['summary']).'<br>' : '') . htmlspecialchars($it['content']) ?>]]></description>
      <pubDate><?= date(DATE_RSS, strtotime($it['created_at'])) ?></pubDate>
      <guid><?= htmlspecialchars($base . '/#news-' . $it['id']) ?></guid>
    </item>
    <?php endforeach; ?>
  </channel>
</rss>

Dashy is showing the Title, but dont want to take the item.
I generated an static.xml and static.php File, but i just get "unable to fetch data" errors.
But somehow it takes the feed.php.

Additional info

No response

Please tick the boxes

Metadata

Metadata

Assignees

Labels

🐛 Bug[ISSUE] Ticket describing something that isn't working

Projects

Status

Awaiting Triage

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions