I'm developing an extension (module) that I want to be compatible with Joomla 1.5, 2.5 and 3.0 if possible. My main issue is getting around the different XML files needed. I decided to create a manifest.xml
file for Joomla 1.5 with the <install>
tag and a mod_mymodule.xml
file for Joomla 2.5/3.0 with a <extension>
tag with the mod_mymodule.xml
containing fieldsets etc. whilst the manifest.xml
contains the <params>
.
My issue is that my extension installs absolutely fine on Joomla 3.0 (on localhost). However when installing on a Joomla 2.5, nothing showed up under the parameters. What is the priority for Joomla 2.5 and why it using the manifest.xml
file with the install tags instead of the mod_mymodule.xml
file?
Does Joomla 2.5 prioritize an <install>
tag at the top of an XML file over another XML file in the same directory with an <extension>
tag?
Manifest File:
<?xml version="1.0" encoding="utf-8"?>
<install type="module" client="site" method="upgrade" version="1.5">
<name></name>
<author>George Wilson</author>
<creationDate>05-Mar-2012</creationDate>
<copyright></copyright>
<license>http://www.gnu.org/licenses/gpl-3.0.html</license>
<authorEmail></authorEmail>
<authorUrl></authorUrl>
<version>1.1.1</version>
<description></description>
<files>
<filename module="mod_mymodule">mod_mymodule.php</filename>
<filename>manifest.xml</filename>
<filename>index.html</filename>
<filename>helper.php</filename>
<folder>assets</folder>
<folder>tmpl</folder>
</files>
<languages>
<language tag="en-GB">language/en-GB/en-GB.mod_mymodule.ini</language>
</languages>
<params>
<param name="blah" type="text" default="5" label="Label" description="Description" />
</params>
</install>
mod_mymodule.xml file:
<?xml version="1.0" encoding="utf-8"?>
<extension type="module" client="site" method="upgrade">
<name></name>
<author>George Wilson</author>
<creationDate>05-Mar-2012</creationDate>
<copyright></copyright>
<license>http://www.gnu.org/licenses/gpl-3.0.html</license>
<authorEmail></authorEmail>
<authorUrl></authorUrl>
<version>1.1.1</version>
<description>Description</description>
<files>
<filename module="mod_mymodule">mod_mymodule.php</filename>
<filename>mod_mymodule.xml</filename>
<filename>index.html</filename>
<filename>helper.php</filename>
<folder>assets</folder>
<folder>sql</folder>
<folder>tmpl</folder>
</files>
<languages>
<language tag="en-GB">language/en-GB/en-GB.mod_mymodule.ini</language>
<language tag="en-GB">language/en-GB/en-GB.mod_mymodule.sys.ini</language>
</languages>
<install>
<sql>
<file driver="mysql" charset="utf8">sql/install.mysql.utf8.sql</file>
</sql>
</install>
<uninstall>
<sql>
<file driver="mysql" charset="utf8">sql/uninstall.mysql.utf8.sql</file>
</sql>
</uninstall>
<config>
<fields name="params">
<fieldset name="basic">
<field name="moduleclass_sfx" type="text" default="" label="COM_MODULES_FIELD_MODULECLASS_SFX_LABEL" description="COM_MODULES_FIELD_MODULECLASS_SFX_DESC" />
</fieldset>
</fields>
</config>
</extension>
Errors: Beneath position parameter: ( ! ) Notice: Trying to get property of non-object in ROOT\administrator\components\com_modules\views\module\tmpl\edit.php on line 50
Beneath ordering parameter ( ! ) Notice: Trying to get property of non-object in C:\wamp\www\joomla25\administrator\components\com_modules\views\module\tmpl\edit.php on line 61
It also says Module XML data not available
at the bottom.
Update: Upon inspection it is definitely the manifest.xml
file that is installing rather than the mod_mymodule.xml
that I want the Joomla 2.5 to use.