Search code examples
xmlpluginsjoomlacomponentspackage

How do I package my joomla 2.5 component with a plugin?


I'm still learning joomla and I was wondering how do you install a plugin with a component in the pkg_youcomponent.xml installation file. I've noticed with Joomla Joomla 1.6 or higher it is possible to use the folder="packages" attribute on files.

I'm trying to package the Rocket Theme RokBox Plugin with my component. But I'm not having much luck.

Here is a zip preview of pkg_autobase.

Zip preview of pkg_autobase
(source: iforce.co.nz)

And here the package script based off this.

<?xml version="1.0" encoding="UTF-8" ?>
<extension type="package" version="1.6">
<name>Autobase</name>
<author>Michael Jones</author>
<creationDate>May 2012</creationDate>
<packagename>autobase</packagename>
<version>1.0.0</version>
<url>http://www.triotech.co.nz/</url>
<packager>Michael Jones</packager>
<packagerurl>http://www.triotech.co.nz/</packagerurl>
<description>Package installer for AutoBase and RokBox Gallery Manager</description>
<update>http://www.triotech.co.nz/update</update>
<files folder="packages">
   <file type="component" id="autobase" >com_autobase.zip</file>
   <file type="plugin" id="rokbox" group="system">plg_sys_rokbox.zip</file>
</files>
</extension>

Now the thing I'm unsure about is.. the joomla 2.5 extension manager reports the error

    Install path does not exist
    Package Install: There was an error installing an extension: com_autobase.zip

But as far as I know I've packaged everything up correctly (both component and plugin install fine individually). Thus I'm wondering how do you correctly package a component?


Solution

    1. Each zip file referred to in the package xml must be a valid installation file.
    2. The error is actually referring to the fact that your XML specifies that the zips are located in a directory called packages but your screenshot shows them on the same level as the package manifest xml.

    You can fix this by either putting them in a directory called packages (the recommended way) or by removing the folder="packages" from the <files> element.