I cant create a basica package extension.. what is wrong with my code?

For Joomla! 3.x Coding related discussions, you could also use: http://groups.google.com/group/joomla-dev-general

Moderators: ooffick, General Support Moderators

Forum rules
Locked
krj10
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Thu Apr 12, 2012 10:29 am

I cant create a basica package extension.. what is wrong with my code?

Post by krj10 » Fri Apr 14, 2017 1:37 am

I am following everything on: https://docs.joomla.org/Package

And still got the error: JInstaller: :Install: Can't find Joomla XML setup file.

The XML file has the correct name.

The package zip file is pkg_mtpackage.zip which contains

pkg_mtpackage.xml
/packages (folder with both extension files)
The XML File is:

Code: Select all

<?xml version="1.0" encoding="UTF-8" ?>
 <extension type="package" version="3.x" method="upgrade">
 <name>MTPackage</name>
 <author>John Doe</author>
 <creationDate>April 2017</creationDate>
 <packagename>mtpackage</packagename>
 <version>1.0.0</version>
 <description>Installation of the main MT Custom extensions.</description>
 <files folder="packages">
   <file type="module" id="mod_mt" client="site">mod_mt.zip</file>
   <file type="module" id="mod_mt_mc" client="site">mod_mt_mc.zip</file>
 </files>
 </extension>
And yes, the extensions are correct, they both install individually. I believe the Id is correct but I tried to replace them with just mtpackage too without any success.

And yes the zip structure is also correct, XML is on the root of the zip file and the folder packages is at the root too... I am lost, its just so simple... what is wrong?

Got the same error on both Joomla 3.6.5 and 3.7 Beta

krj10
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Thu Apr 12, 2012 10:29 am

Re: I cant create a basica package extension.. what is wrong with my code?

Post by krj10 » Sat Apr 15, 2017 1:47 am

Ok, I discovered what the issue was.. It was just something very silly.

The issue was that the XML on the pkg starts with:

Code: Select all

<?xml version="1.0" encoding="UTF-8" ?>
And the XML on one of the extension starts with:

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
Noticed the difference? The encoding paramter ITS CASE SENSITIVE! I am not sure if that was some kind of error that the Joomla team could predict (XML is just a clumsy language after all).

But if you have this kind of issue just check if all XML values (from extensions and of course from the XML package) are lowercase.

Code: Select all

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


Locked

Return to “Joomla! 3.x Coding”