JInstaller: :Install: Error SQL DB function reports no error

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
vitalegi
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Thu Nov 14, 2013 2:38 pm

JInstaller: :Install: Error SQL DB function reports no error

Post by vitalegi » Thu Nov 14, 2013 2:57 pm

Hi!
I'm new to Joomla, i'm trying to develope some basic module with it. I've some experience with different programming languages, but that doesn't help.

I'm following this guide http://docs.joomla.org/J3.2:Creating_a_ ... e_Database(if you have other guides, please tell me, i cannot find anything else), and i'm stuck.
yet i've realized the helloworld module, and it works.
when i try to add the database, it stops working.
following the guide, i've edited the previous mod_helloworld.xml to this:

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<extension type="module" version="3.1.0" client="site" method="upgrade">
    <name>Hello, World!</name>
    <author>John Doe</author>
    <version>1.0.0</version>
    <description>A simple Hello, World! module.</description>
    <files>
        <filename>mod_helloworld.xml</filename>
        <filename module="mod_helloworld">mod_helloworld.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>
creating all the directories: sql>mysql>updates
putting in mysql the two sql files given in the guide, and in updates the empty file 1.0.0.sql.

put the helloworld directory(in which i've put everything) in an archive, upload it with joomla, and get this error message:

Warning
JInstaller: :Install: Error SQL DB function reports no errors
Module Install: SQL error file DB function reports no errors

Message
Error installing module

note that it did not create any table in the db.

and, when i try to remove this module(i don't know why it did install it if an error has occured) i get:


Warning

JFolder: :files: Path is not a folder. Path: C:\xampp\htdocs\giambalajapress\modules\mod_helloworld

JFolder: :files: Path is not a folder. Path: C:\xampp\htdocs\giambalajapress\modules\mod_helloworld

JInstaller: :Install: Cannot find XML setup file

JFolder: :files: Path is not a folder. Path: C:\xampp\htdocs\giambalajapress\modules\mod_helloworld

JFolder: :files: Path is not a folder. Path: C:\xampp\htdocs\giambalajapress\modules\mod_helloworld

JInstaller: :Install: Cannot find XML setup file

JFolder: :files: Path is not a folder. Path: C:\xampp\htdocs\giambalajapress\modules\mod_helloworld

JFolder: :files: Path is not a folder. Path: C:\xampp\htdocs\giambalajapress\modules\mod_helloworld

JInstaller: :Install: Cannot find XML setup file

JFolder: :delete: Path is not a folder. Path: C:\xampp\htdocs\giambalajapress\modules\mod_helloworld

Module Uninstall: Manifest file invalid or not found.
Message

Error uninstalling module.

and, checking in modules folder in the joomla directory, there isn't the module.

please, could you help me?

edit: i'm using joomla 3.2

User avatar
Bakual
Joomla! Ace
Joomla! Ace
Posts: 1038
Joined: Sun Dec 13, 2009 9:00 pm
Location: Switzerland
Contact:

Re: JInstaller: :Install: Error SQL DB function reports no e

Post by Bakual » Thu Nov 14, 2013 6:04 pm

Personally I think this tutorial doesn't show the best example. Usually modules only show data from the database. They don't add data to the database and even less likely do they create the database tables or altering the structure.
Usually that is the scope of a component where you also have a backend to manage the data. For components the tutorial is found here: http://docs.joomla.org/Developing_a_MVC_Component

Personally I never tried if you even can do that with a module. But I guess since it's written in the tutorial it should work :-D

Now it depends what you want to do with your module. Do you really need to create own database tables or do you only want to retrieve data from already present tables? If the latter you can skip the part dealing with database in the XML file and go straight to the query building in the helper file.

vitalegi
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Thu Nov 14, 2013 2:38 pm

Re: JInstaller: :Install: Error SQL DB function reports no e

Post by vitalegi » Thu Nov 14, 2013 7:02 pm

mmm don't know, it would be nice to manage everything in the module that works on the data, but, since it is a very specific task, i can create all the table manually, and then let it use them.

uff.. don't know why, but i cannot stop hating php + joomla, if it were python + Django, it will all be much easier and faster.

cbrown_bacr
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Fri Dec 06, 2013 8:20 pm

Re: JInstaller: :Install: Error SQL DB function reports no e

Post by cbrown_bacr » Fri Dec 06, 2013 10:46 pm

Has anyone been able to solve this problem? I'm having the same issue. Thanks!

pascal910
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Sat Dec 21, 2013 3:23 pm
Location: Germany (NRW)
Contact:

Re: JInstaller: :Install: Error SQL DB function reports no e

Post by pascal910 » Sun Dec 29, 2013 5:06 pm

Had the same issue and found a solution after debugging the core :)
The .sql files have to be copied to the joomla module/component/plugin folder, too because they are executed from this place!

To do this, simply add the folder from the install dir to the files-section in your .xml:

Code: Select all

<files>
  <folder>sql/mysql</folder>
</files>
That should be all!

BTW (for further debugging): The place where Joomla builds the path to the sql-file you can find in 'libraries/cms/installer/installer.php' on line 912 (Joomla 3.2.1)

Code: Select all

$sqlfile = $this->getPath('extension_root') . '/' . $file;

tonycompu
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Sat Aug 29, 2009 3:01 am

Re: JInstaller: :Install: Error SQL DB function reports no e

Post by tonycompu » Wed Nov 12, 2014 5:20 pm

Hello,

I've fixed my problem with pascal910's solution, but now I'm getting this error:
If difficulties persist, please contact the System Administrator of this site and report the error below.

1146 Table 'use143xxxxx.ozwkm_helloworld' doesn't exist SQL=SELECT `hello` FROM `ozwkm_helloworld` WHERE lang = 'fr-FR'
After install this extension I reviewed the db and the table helloworld is not there. It's like the installation didn't execute the file install.mysql.utf8.sql

help.

thanks.

this is my install.mysql.utf8.sql

Code: Select all

CREATE TABLE IF NOT EXISTS `#__helloworld` (
        `id int NOT NULL AUTO_INCREMENT,
        `hello` text NOT NULL,
        `lang` varchar(25) NOT NULL,
 
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;
 
INSERT INTO `#__helloworld` (`hello`, `lang`) VALUES (`Hello World`, `en-GB`);
INSERT INTO `#__helloworld` (`hello`, `lang`) VALUES (`Hola Mundo`, `es-ES`);
INSERT INTO `#__helloworld` (`hello`, `lang`) VALUES (`Bonjour tout le monde`, `fr-FR`)

igorbrp
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Sat Jan 17, 2015 3:14 pm

Re: JInstaller: :Install: Error SQL DB function reports no e

Post by igorbrp » Sat Jan 17, 2015 3:20 pm

Hello,
I had the same problem and was correct at the suggestion of pascal910 and the correction of an error by my distraction: there was created the updates folder in sql / mysql.


Locked

Return to “Joomla! 3.x Coding”