0
votes

I created Joomla Module by following tutorial on joomla website, for the first part it works but after i added 2nd part of tutorial about Creating a simple module/Using the Database it doesn't work. i got warning

JInstaller: :Install: Can't find Joomla XML setup file.

the 2nd part tutorial is based on 1st tutorial. maybe i've done something wrong in my XML file. this is my XML file

<?xml version="1.0" encoding="utf-8"?>
<extension type="module" version="3.1.0" client="site" method="upgrade">
    <name>Hello, World 2</name>
    <author>Dhany</author>
    <version>1.0.0</version>
    <description>Belajar Module 2</description>
    <files>
        <folder>sql</folder>
        <filename>mod_helloworld2.xml</filename>
        <filename module="mod_helloworld">mod_helloworld2.php</filename>
        <filename>index.html</filename>
        <filename>helper.php</filename>
        <filename>tmpl/default.php</filename>
        <filename>tmpl/index.html</filename>
    </files>
    <config>
    </config>
</extension>

<install>
     <sql>
         <file driver="mysql" charset="utf8">sql/mysql/install.mysql.utf8.sql</file>
     </sql>
</install>

<uninstall>
     <sql>
         <file driver="mysql" charset="utf8">sql/mysql/uninstall.mysql.utf8.sql</file>
     </sql>
</uninstall>

<update> 
    <schemas>
        <schemapath type="mysql">sql/mysql/updates</schemapath> 
    </schemas> 
</update>
you can download my complete module here

thanks for your help

1
If you are doing Joomla development then you owe it to yourself to register an account on Joomla Stack Exchange. Whenever you have a question that directly pertains to Joomla OR would benefit from the support of a community with intimate knowledge of the CMS and its extensions, then you should post your question on JSE instead of Stack Overflow. After registering at JSE, you may wish to flag this question to be migrated by moderators from here to JSE. - mickmackusa

1 Answers

0
votes

Remember </extension> should come at the end. Not in between. That should be the ending tag. Your code should looklike this.

<?xml version="1.0" encoding="utf-8"?>
<extension type="module" version="3.1.0" client="site" method="upgrade">
    <name>Hello, World 2</name>
    <author>Dhany</author>
    <version>1.0.0</version>
    <description>Belajar Module 2</description>
    <files>
        <folder>sql</folder>
        <filename>mod_helloworld2.xml</filename>
        <filename module="mod_helloworld">mod_helloworld2.php</filename>
        <filename>index.html</filename>
        <filename>helper.php</filename>
        <filename>tmpl/default.php</filename>
        <filename>tmpl/index.html</filename>
    </files>
    <config>
    </config>


<install>
     <sql>
         <file driver="mysql" charset="utf8">sql/mysql/install.mysql.utf8.sql</file>
     </sql>
</install>

<uninstall>
     <sql>
         <file driver="mysql" charset="utf8">sql/mysql/uninstall.mysql.utf8.sql</file>
     </sql>
</uninstall>

<update> 
    <schemas>
        <schemapath type="mysql">sql/mysql/updates</schemapath> 
    </schemas> 
</update>
</extension>

Note: I also noted that your updates is a file instead of a folder. Remember it should be a folder.