Joomla 组件更新 XML 文件解析错误
Joomla Component Updates XML File Parsing error
我在 Joomla 中有一个付费组件,根据最新的 JED 要求,所有开发人员都必须提供与 Joomla 更新系统的兼容性,作为支持分发安全修复、增强和新功能的方法的一种方式。顺应潮流,我将我的组件更新为 1.1.0
版本,并在安装文件中给出了更新服务器要求。
这是添加到 manifest.xml 文件的额外代码
<updateservers>
<server type="extension" name="Code Seller">https://www.scriptplaza.com/downloads/codeseller.xml</server>
</updateservers>
所以任何安装此版本的人都会在控制面板中收到所有进一步的更新通知。第二天,我上传了另一个版本 1.1.1
,并进行了小幅更新。根据更新服务器的要求,此更新应显示在后端控制面板更新页面上,其中显示所有扩展的更新。列出了许多扩展更新,但不是我的。在过去的两天里,我一直在努力解决这个问题,但没有成功。我觉得我的服务器中托管的更新 xml 文件有一些错误。这是codeseller.xml代码
<?xml version="1.0" encoding="utf-8"?>
<updates>
<update>
<name><![CDATA[Codeseller]]></name>
<description><![CDATA[Paid Download Component]]></description>
<element>pkg_codeseller</element>
<type>package</type>
<version>1.1.1</version>
<infourl title="scriptplaza.com">http://www.scriptplaza.com</infourl>
<downloads>
<downloadurl type="full" format="zip">
<![CDATA[https://scriptplaza.com/index.php?option=com_codeseller&controller=order&task=order.downloadupdates&product_id=4]]>
</downloadurl>
</downloads>
<tags>
<tag>stable</tag>
</tags>
<maintainer><![CDATA[Amreeta Ray]]></maintainer>
<maintainerurl>http://www.scriptplaza.com</maintainerurl>
<section>Testing</section>
<targetplatform name="joomla" version="3.6"/>
</update>
</updates>
我遵循了本教程 https://docs.joomla.org/Deploying_an_Update_Server。还有什么我想念的吗?
如果你喜欢可以快速浏览一下我的更新文件:
https://www.svenbluege.de/index.php?option=com_ars&view=update&task=stream&format=xml&id=1
我正在使用自动生成此 XML 的 Akkeba 发布系统。也许您通过将它与您的 XML 文件进行比较来找到缺失的部分。
包中的引用如下所示:
<updateservers>
<server type="extension" priority="1" name="Event Gallery">http://www.svenbluege.de/index.php?option=com_ars&view=update&task=stream&format=xml&id=1</server>
</updateservers>
此外,您可以检查您的更新 url 是否在 #__update_sites
table 中。
对于所有遇到困难的人,我将提供一个与 Joomla 文档不匹配但有效的解决方案。这意味着 Joomla 文档需要更新。如果你检查这个 link https://docs.joomla.org/Deploying_an_Update_Server 他们说
client - Required for modules and templates as of 3.2.0. - The client ID of the extension, which can be found by looking inside the #__extensions table. To date, use 0 for "site" and 1 for "administrator". Plugins and front-end modules are automatically installed with a client of 0 (site), but you will need to specify the client in an update or it will default to 1 (administrator) and then found update would not be shown because it would not match any extension. Components are automatically installed with a client of 1, which is currently the default.
Warning: The tag name is <client> for Joomla! 2.5 and <client_id> for 1.6 and 1.7. If you use <client_id> (rather than <client>) on a 2.5 site, it will be ignored.
实际情况并非如此,当我检查我的 #__updates 时,我看到所有语言文件的客户端 ID 为 0,但我的扩展程序有 1。所以只是为了检查,我将 <client>0</client>
添加到我的xml 文件。瞧,它起作用了。所以最后我得到了这个完整的更新文件
<?xml version="1.0" encoding="utf-8"?>
<updates>
<update>
<name><![CDATA[Codeseller]]></name>
<description><![CDATA[Paid Download Component]]></description>
<element>pkg_codeseller</element>
<client>0</client>
<type>package</type>
<version>1.1.1</version>
<infourl title="scriptplaza.com">http://www.scriptplaza.com</infourl>
<downloads>
<downloadurl type="full" format="zip">
<![CDATA[https://scriptplaza.com/index.php?option=com_codeseller&controller=order&task=order.downloadupdates&product_id=4]]>
</downloadurl>
</downloads>
<tags>
<tag>stable</tag>
</tags>
<maintainer><![CDATA[Amreeta Ray]]></maintainer>
<maintainerurl>http://www.scriptplaza.com</maintainerurl>
<section>Testing</section>
<targetplatform name="joomla" version="3.6"/>
</update>
</updates>
检查您的 manifest.xml 是否包含 <packagename>codeseller</packagename>
并匹配您的更新流
<element>pkg_codeseller</element>
如果您使用 Akeeba 版本:
我过去两天也很挣扎,但出于另一个原因,我现在仍在解释,因为它可能对其他人有帮助:
Akeeba 版本检查 /components/com_ars/View/Update/tmpl/stream.php
中的环境字符串
它必须是 "Environment Title" = "joomla" 并且 "XML update stream platform" 高于 2.5 才能在更新流中产生 <client>
否则它会产生 <client_id>
自从我使用 "XML update stream platform" = ".*"
以来,我已经失去了 2 天
将提出拉取请求,要求删除 Akeeba 版本中的 Joomla 2.5 支持。
我在 Joomla 中有一个付费组件,根据最新的 JED 要求,所有开发人员都必须提供与 Joomla 更新系统的兼容性,作为支持分发安全修复、增强和新功能的方法的一种方式。顺应潮流,我将我的组件更新为 1.1.0
版本,并在安装文件中给出了更新服务器要求。
这是添加到 manifest.xml 文件的额外代码
<updateservers>
<server type="extension" name="Code Seller">https://www.scriptplaza.com/downloads/codeseller.xml</server>
</updateservers>
所以任何安装此版本的人都会在控制面板中收到所有进一步的更新通知。第二天,我上传了另一个版本 1.1.1
,并进行了小幅更新。根据更新服务器的要求,此更新应显示在后端控制面板更新页面上,其中显示所有扩展的更新。列出了许多扩展更新,但不是我的。在过去的两天里,我一直在努力解决这个问题,但没有成功。我觉得我的服务器中托管的更新 xml 文件有一些错误。这是codeseller.xml代码
<?xml version="1.0" encoding="utf-8"?>
<updates>
<update>
<name><![CDATA[Codeseller]]></name>
<description><![CDATA[Paid Download Component]]></description>
<element>pkg_codeseller</element>
<type>package</type>
<version>1.1.1</version>
<infourl title="scriptplaza.com">http://www.scriptplaza.com</infourl>
<downloads>
<downloadurl type="full" format="zip">
<![CDATA[https://scriptplaza.com/index.php?option=com_codeseller&controller=order&task=order.downloadupdates&product_id=4]]>
</downloadurl>
</downloads>
<tags>
<tag>stable</tag>
</tags>
<maintainer><![CDATA[Amreeta Ray]]></maintainer>
<maintainerurl>http://www.scriptplaza.com</maintainerurl>
<section>Testing</section>
<targetplatform name="joomla" version="3.6"/>
</update>
</updates>
我遵循了本教程 https://docs.joomla.org/Deploying_an_Update_Server。还有什么我想念的吗?
如果你喜欢可以快速浏览一下我的更新文件:
https://www.svenbluege.de/index.php?option=com_ars&view=update&task=stream&format=xml&id=1
我正在使用自动生成此 XML 的 Akkeba 发布系统。也许您通过将它与您的 XML 文件进行比较来找到缺失的部分。
包中的引用如下所示:
<updateservers>
<server type="extension" priority="1" name="Event Gallery">http://www.svenbluege.de/index.php?option=com_ars&view=update&task=stream&format=xml&id=1</server>
</updateservers>
此外,您可以检查您的更新 url 是否在 #__update_sites
table 中。
对于所有遇到困难的人,我将提供一个与 Joomla 文档不匹配但有效的解决方案。这意味着 Joomla 文档需要更新。如果你检查这个 link https://docs.joomla.org/Deploying_an_Update_Server 他们说
client - Required for modules and templates as of 3.2.0. - The client ID of the extension, which can be found by looking inside the #__extensions table. To date, use 0 for "site" and 1 for "administrator". Plugins and front-end modules are automatically installed with a client of 0 (site), but you will need to specify the client in an update or it will default to 1 (administrator) and then found update would not be shown because it would not match any extension. Components are automatically installed with a client of 1, which is currently the default.
Warning: The tag name is <client> for Joomla! 2.5 and <client_id> for 1.6 and 1.7. If you use <client_id> (rather than <client>) on a 2.5 site, it will be ignored.
实际情况并非如此,当我检查我的 #__updates 时,我看到所有语言文件的客户端 ID 为 0,但我的扩展程序有 1。所以只是为了检查,我将 <client>0</client>
添加到我的xml 文件。瞧,它起作用了。所以最后我得到了这个完整的更新文件
<?xml version="1.0" encoding="utf-8"?>
<updates>
<update>
<name><![CDATA[Codeseller]]></name>
<description><![CDATA[Paid Download Component]]></description>
<element>pkg_codeseller</element>
<client>0</client>
<type>package</type>
<version>1.1.1</version>
<infourl title="scriptplaza.com">http://www.scriptplaza.com</infourl>
<downloads>
<downloadurl type="full" format="zip">
<![CDATA[https://scriptplaza.com/index.php?option=com_codeseller&controller=order&task=order.downloadupdates&product_id=4]]>
</downloadurl>
</downloads>
<tags>
<tag>stable</tag>
</tags>
<maintainer><![CDATA[Amreeta Ray]]></maintainer>
<maintainerurl>http://www.scriptplaza.com</maintainerurl>
<section>Testing</section>
<targetplatform name="joomla" version="3.6"/>
</update>
</updates>
检查您的 manifest.xml 是否包含 <packagename>codeseller</packagename>
并匹配您的更新流
<element>pkg_codeseller</element>
如果您使用 Akeeba 版本: 我过去两天也很挣扎,但出于另一个原因,我现在仍在解释,因为它可能对其他人有帮助:
Akeeba 版本检查 /components/com_ars/View/Update/tmpl/stream.php
它必须是 "Environment Title" = "joomla" 并且 "XML update stream platform" 高于 2.5 才能在更新流中产生 <client>
否则它会产生 <client_id>
自从我使用 "XML update stream platform" = ".*"
以来,我已经失去了 2 天将提出拉取请求,要求删除 Akeeba 版本中的 Joomla 2.5 支持。