1

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:

<?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

2

I've tested with your code, and it works for me.

To try and isolate the bug, I'd probably firstly remove the <files> node and the packages folder and see if you get a Package Update: There were no files to install! error message instead. If you continue to get the Can't find Joomla XML setup file. error message then this would confirm that the problem is with your package's manifest file.

If that is the case, it may be worth updating your question with a download of this simplified one-file package in the hope other users can replicate the problem.

To isolate the issue further, you may wish to try and get more accurate details of the failure than the error message provides.

There are two possible places this error may be called \libraries\cms\installer\helper.php - at which the function detectType (line 250) calls the code JLog::add(JText::_('JLIB_INSTALLER_ERROR_NOTFINDJOOMLAXMLSETUPFILE'), JLog::WARNING, 'jerror'); if it cannot find what type of package it is, and libraries\cms\installer\installer.php where it creates the same error message if it can't find a manifest file in the findManifest() function (line 1885).

If you feel up to it, you may be able to dump variables to screen to see at what point these functions are failing and that might provide useful information.

Obviously, revert any core changes afterwards.

3

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

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

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

And the XML on one of the extension starts with:

 <?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.

<?xml version="1.0" encoding="utf-8"?>
  • Capitalised worked fine for me, and whilst lower case seems more common, there is core code in Joomla that capitalises (and, indeed, the tutorial you linked to does). Wonder if it's a server setting rather than a Joomla thing? – Richard B Apr 15 '17 at 9:27
  • I am not sure that its the server because it happened on my hosting (bluehost) but also on wamp. – user1967509 Apr 15 '17 at 17:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.