Component XML Installation Problem

Have a programming question regarding your component, plug-in, extension or core hacks? Have an interesting tidbit, FAQ or programming tip you’d like to share? This is the place for you.

Moderators: tjay, seadap, Rogue4ngel, matthewhayashida

Post Reply
User avatar
uweD
Joomla! Apprentice
Joomla! Apprentice
Posts: 39
Joined: Mon May 14, 2007 9:38 pm
Location: Auckland -- New Zealand
Contact:

Component XML Installation Problem

Post by uweD » Tue Sep 11, 2007 11:53 pm

Hi,

Can anyone see from this xml file below, why the joomla installer doesn't execute my SQL file? I can install my little demo component, but the tables are not being created. Have I missed something in the xml?

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE install SYSTEM "http://dev.joomla.org/xml/1.5/component-install.dtd">
   <install type="component" version="1.5.0">
   
      <name>Messageboard</name>
      <author>Uwe Duesing</author>
      <creationDate>August 2007</creationDate>
      <copyright>Uwe Duesing</copyright>
      <authorEmail>[email protected]</authorEmail>
      <authorUrl>www.uweduesing.com</authorUrl>
      <version>1.5.0</version>
      <license>GNU/GPL, see LICENSE.php</license>
      <description>Demo component</description>
      
      <files>
            <filename>controller.php</filename>
            <filename>messageboard.php</filename>
            <filename>register_component.sql</filename>
            <filename>models/default.php</filename>
            <filename>models/save.php</filename>
            <filename>models/show.php</filename>
            <filename>tables/messages.php</filename>
            <filename>views/confirmsave/tmpl/default.php</filename>
            <filename>views/confirmsave/view.html.php</filename>
            <filename>views/enterdata/tmpl/default.php</filename>
            <filename>views/enterdata/view.html.php</filename>
            <filename>views/show/tmpl/default.php</filename>
            <filename>views/show/view.html.php</filename>
      </files>
            <install>
               <sql>
                  <file driver="mysql">install.mysql.sql</file>
                  </sql>
                </install>
                
                <uninstall>
                   <sql>
                      <file driver="mysql">uninstall.mysql.sql</file>
               </sql>
            </uninstall>
      <administration>
      <menu>messageboard</menu>
         <files folder="admin">
            <filename>admin.messageboard.php</filename>
            <filename>install.mysql.sql</filename>
            <filename>uninstall.mysql.sql</filename>
         </files>
      </administration>
</install>


Here is the sql

Code: Select all

DROP TABLE IF EXISTS `#__messageBoard`;

CREATE TABLE '#__messageBoard' IF NOT EXISTS (
'name' VARCHAR( 200 ) NOT NULL ,
'surname' VARCHAR( 200 ) NOT NULL ,
'email' VARCHAR( 200 ) NOT NULL ,
'message' TEXT NOT NULL ,
id INT NOT NULL AUTO_INCREMENT PRIMARY KEY
) ENGINE = innodb



Thanks a lot for your help,
Uwe
Last edited by uweD on Wed Sep 12, 2007 1:13 am, edited 1 time in total.
________________________
Uwe Duesing
http://www.uweduesing.com
Skype:uweOnehunga

User avatar
tjay
Joomla! Intern
Joomla! Intern
Posts: 73
Joined: Thu Aug 18, 2005 1:50 am
Location: New Orleans
Contact:

Re: Component XML Installation Problem

Post by tjay » Wed Sep 12, 2007 1:07 am

I dont see it, does it error on install?
This day it is my wish that I helped you to live

User avatar
uweD
Joomla! Apprentice
Joomla! Apprentice
Posts: 39
Joined: Mon May 14, 2007 9:38 pm
Location: Auckland -- New Zealand
Contact:

Re: Component XML Installation Problem

Post by uweD » Wed Sep 12, 2007 1:11 am

No - But I have meanwhile rewritten the silly thing  ;) and surprise it works. It told me that everything was fine, but the data bas table was not created. Anyway here is my new xml file and suddenly everything is fine. One of those things I guess...

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE install SYSTEM "http://dev.joomla.org/xml/1.5/component-install.dtd">
<install type="component" version="1.5.0">
   <name>Message Board</name>
   <!-- The following elements are optional and free of formatting conttraints -->
   <creationDate>2007 09 12</creationDate>
   <author>Uwe Duesing</author>
   <authorEmail>[email protected]</authorEmail>
   <authorUrl>http://www.uweduesing.com</authorUrl>
   <copyright>Copyright Info</copyright>
   <license>License Info</license>
   <!--  The version string is recorded in the components table -->
   <version>Component Version String</version>
   <!-- The description is optional and defaults to the name -->
   <description>Description of the component ...</description>

   <!-- Site Main File Copy Section -->
      <files>
            <filename>controller.php</filename>
            <filename>messageboard.php</filename>
            <filename>register_component.sql</filename>
            <filename>models/default.php</filename>
            <filename>models/save.php</filename>
            <filename>models/show.php</filename>
            <filename>tables/messages.php</filename>
            <filename>views/confirmsave/tmpl/default.php</filename>
            <filename>views/confirmsave/view.html.php</filename>
            <filename>views/enterdata/tmpl/default.php</filename>
            <filename>views/enterdata/view.html.php</filename>
            <filename>views/show/tmpl/default.php</filename>
            <filename>views/show/view.html.php</filename>
      </files>
   <install>
      <sql>
         <file charset="utf8" driver="mysql">install.sql</file>
      </sql>
   </install>
   <uninstall>
      <sql>
         <file charset="utf8" driver="mysql">uninstall.sql</file>
      </sql>
   </uninstall>  
   <administration>
      <!-- Administration Menu Section -->
      <menu>Message Board</menu>
     
      <!-- Administration Main File Copy Section -->
      <!-- Note the folder attribute: This attribute describes the folder
         to copy FROM in the package to install therefore files copied
         in this section are copied from /admin/ in the package -->
         <files folder="admin">
            <filename>admin.messageboard.php</filename>
            <filename>install.sql</filename>
            <filename>uninstall.sql</filename>
         </files> 
   </administration>
</install>
________________________
Uwe Duesing
http://www.uweduesing.com
Skype:uweOnehunga


Post Reply