Page 1 of 1

Trying To Build A Module - XML Setup File Not Found

Posted: Sun Mar 23, 2008 5:58 pm
by drmmr763
Hello all!

I'm attempting to teach myself how to build some simple modules. I'm primarily building for J! 1.5. I'm using the book Professional Joomla!, by Dan Rahmel to learn.

I've found the directions exactly on building a simple 'hello world' module. But, for some reason when I try to install this module I get this error:
Error! Could not find a Joomla! XML setup file in the package.
.

Now, here is the code I'm using.

File name: mod_helloworld.php
[code]<?php
/**
* @version $Id: mod_hellojoomla.php 5203 2007-03-27 01:42:10Z Danr $
* @package Joomla
* @copyright Copyright (C) 2007 Dan Rahmel. All rights reserved.
* @license GNU/GPL
* This is a simple component to display a hello greeting.
*/
// no direct access
defined( ‘_JEXEC’ ) or die( ‘Restricted access’ );
echo JText::_( ‘Hello World!’);[/code]


Here is my XML File:
File name: mod_helloworld.xml
[code]<?xml version=”1.0” encoding=”utf-8”?>
<install type=”module” version=”1.5.0”>
<name>Hello World</name>
<author>Dan Rahmel</author>
<creationDate>March 2007</creationDate>
<copyright>(C) 2007 Dan Rahmel. All rights reserved.</copyright>
<license>GNU/GPL</license>
<authorEmail>[email protected]</authorEmail>
<authorUrl>www.joomlajumpstart.org</authorUrl>
<version>1.0.0</version>
<description>Hello World module</description>
<files>
<filename module=”mod_helloworld”>mod_helloworld.php</filename>
</files>
</install>[/code]


I've read this part of the book multiple times, (pages 145+) and even looked at other J! 1.5 modules to see if I was missing something. I don't think that I am. Now, to pack the files into a .zip I use Power Archiver. I'm using the full version so I don't think it has anything to do with my packing utility. I'm applying no passwords/security measures at all.

So, can anyone tell me why my XML file doesn't seem to be detected by J! 1.5. I've tried zipping up just the two files (xml and php) into the archive, I've tried putting it into a sub folder. But, no matter what I can't seem to make things work. Any advice/thoughts would be greatly appreciated.

Re: Trying To Build A Module - XML Setup File Not Found

Posted: Sun Mar 23, 2008 6:34 pm
by erdsiger
I don't if it's really not there or you just accidentally forgot to insert, but there is no ?> end tag for php in mod_helloworld.php. If not this is the problem, I don't know what, anyway I attached the working mod_helloworld.zip file based on your code, hope it helps.

Re: Trying To Build A Module - XML Setup File Not Found

Posted: Sun Mar 23, 2008 6:58 pm
by drmmr763
Hey thanks for that!

I'm checking the book again-and the closing php tag isn't even there. But, even after adding it to my existing file it didn't work. I exchanged my XML file for the one you provided and it worked. I think that the problem must be my archiving utility. I'll experiment more with that later.

Thanks again.

Re: Trying To Build A Module - XML Setup File Not Found

Posted: Sun Mar 23, 2008 7:04 pm
by erdsiger
drmmr763 wrote:I'm checking the book again-and the closing php tag isn't even there.
I'm sorry, it's my mistake, there shouldn't be and end tag.
drmmr763 wrote:I think that the problem must be my archiving utility.
Try to compress it with an other tool. Could attach the compressed file? Maybe I will find something useful.

Re: Trying To Build A Module - XML Setup File Not Found

Posted: Sun Mar 23, 2008 8:10 pm
by drmmr763
I actually deleted the old files and am using the one you posted up. And, I've already got a nice html module working. So, it seems I'm on my way to building some more advanced modules.

Re: Trying To Build A Module - XML Setup File Not Found

Posted: Sun Mar 23, 2008 8:22 pm
by erdsiger
Good to hear that. :) Good luck on developing! ;)