【问题标题】:How do I configure RSS XML generation of Joomla 3.9.11?如何配置 Joomla 3.9.11 的 RSS XML 生成?
【发布时间】:2022-10-20 20:29:58
【问题描述】:

我在 Joomla 3.9.11 上有一个网站。我想从我的其他站点获取其中一个类的 RSS。我知道 RSS URL 是这样生成的:https://class-URL/?format=feed&type=rss,将/?format=feed&type=rss 添加到类 URL。该 URL 返回一个 XML 文件。我的网站可以做到这一点,但当我尝试从其他网站使用它时它不起作用。

W3C's RSS validator 说:

This feed does not validate.

    line 2, column 0: XML parsing error: <unknown>:2:0: XML or text declaration not at start of entity

<?xml version="1.0" encoding="utf-8"?>

我怀疑问题是我的 Joomla 在开始时生成了带有样式表行的 XML。如果这是问题所在,我该如何配置它以不在开头添加该行。

这些是我的站点生成的 RSS XML 的第一行:

<?xml version="1.0" encoding="utf-8"?>
<!-- generator="Joomla! - Open Source Content Management" -->
<?xml-stylesheet href="/plugins/system/jce/css/content.css?f61cab3fb74292b84d5f87308bfd17d0" type="text/css"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>Name of my site - I hide it for security</title>
        <description>
            <![CDATA[Description of my site. I hide it for security]]>
        </description>
        <link>https://my-category-URL</link>
        <lastBuildDate>Thu, 15 Sep 2022 16:45:58 -0500</lastBuildDate>
        <generator>Joomla! - Open Source Content Management</generator>
        <atom:link rel="self" type="application/rss+xml" href="https://my-category-URL.feed?type=rss" />
        <language>es-es</language>
        <managingEditor>admin email and name</managingEditor>
        <item>
            <title>title of the last article of my class</title>

【问题讨论】:

    标签: xml xml-parsing rss joomla3.0 rss2


    【解决方案1】:

    经过调查,我发现插件 BootstrapRemover 和 bkcrotator 正在将这些空白行添加到 RSS XML。我停用了它们,就是这样,问题解决了。

    【讨论】:

      猜你喜欢
      • 2012-10-27
      • 2011-09-18
      • 2013-10-27
      • 1970-01-01
      • 1970-01-01
      • 2011-06-04
      • 2011-05-04
      • 2015-12-17
      • 1970-01-01
      相关资源
      最近更新 更多