mod_HelloWorld tutorial - pat template error

Joomla! Documentation Workgroup

Moderator: Documentation

Locked
synavia
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Thu May 04, 2006 12:40 am

mod_HelloWorld tutorial - pat template error

Post by synavia » Sun May 07, 2006 1:47 pm

Hi
I followed the mod_HelloWorld tutorial, but cannot run the module at all:

Firstly, in mod_HelloWorld.php I had to change the patFactory::CreateTemplate reference operator from &amp to its literal value & (this may just be my PHP config on my PC).

Second, more seriously, my main page won't load with the mod_HelloWorld installed (any version ie. 1 to 3).
I get  a message as the module loads on the left hand side of the page

"pat-Error Could not load templates from bullets.html."

Is this a side effect of the newest version of Joomla! (1.8)? Or....???
Thanks guys

Justin

Noth
Joomla! Intern
Joomla! Intern
Posts: 55
Joined: Tue Jun 13, 2006 11:05 pm

Re: mod_HelloWorld tutorial - pat template error

Post by Noth » Tue Aug 01, 2006 7:27 am

I am having the exact same problem.  Yes I thought changing the & to just & would fix it but then I ran into the error

pat-Error Could not load templates from default.html.

The title displays fine, so technically the hello world module does what its meant to  ;), but I cannot get any further.  Another post mentioned the same issue, but no solution.

happyt
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Mon Nov 07, 2005 11:46 am
Contact:

Re: mod_HelloWorld tutorial - pat template error - one solution

Post by happyt » Fri Sep 08, 2006 11:23 am

This was because the module is looking for the default.html from within a folder beneath the modules directory. If you create a directory called mod_helloworld in the modules directory and then put the default.html file into it, the module should work correctly and display the time.

I assume that this should be done by defining the default.html file within the xml file, so that the directory creation is done automatically on install, but I don't know the system well enough yet.
Last edited by happyt on Fri Sep 08, 2006 11:46 am, edited 1 time in total.

User avatar
Oak
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 210
Joined: Wed Jun 07, 2006 3:04 pm
Location: Ireland

Re: mod_HelloWorld tutorial - pat template error - one solution

Post by Oak » Tue Feb 06, 2007 9:47 pm

happyt wrote: This was because the module is looking for the default.html from within a folder beneath the modules directory. If you create a directory called mod_helloworld in the modules directory and then put the default.html file into it, the module should work correctly and display the time.
I have the same problem: pat-Error Could not load templates from pubsubsdb.html, where "pubsubsdb.html" is a file located within the folder com_pubsubs.

It is a sad fact, that NOT a single tutorial published on Joomla was working for me. Last component I built sometimes in July and it took me circa 3 weeks and I had to read few hundreds of posts in phorum to finish it. And I found out, that many people do things in Joomla components very differently, ofthen guessing or saying "have no idea why, but this worked for me...".
Perphaps the creators of Joomla component system themselfs should clearly state how their system should be treated and do  as simple tutorial or re-evaluate and edit an existing one...
Oak

User avatar
Oak
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 210
Joined: Wed Jun 07, 2006 3:04 pm
Location: Ireland

Re: mod_HelloWorld tutorial - pat template error

Post by Oak » Tue Feb 06, 2007 10:39 pm

How easy it is with proper information...
if you have this line in your admin.your_component.html.php:

Code: Select all

$tmpl->setRoot( dirname( __FILE__ ) . '/tmpl' );
than you have to place your admin.your_component.html.php file into sub-directory tmpl. That's it.
Oak

krneki13
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Thu Apr 15, 2010 10:04 am

Re: mod_HelloWorld tutorial - pat template error

Post by krneki13 » Thu Apr 15, 2010 10:09 am

This module that I created with info from various sites and testing works for me!
You do not have the required permissions to view the files attached to this post.

User avatar
elkuku
Joomla! Intern
Joomla! Intern
Posts: 97
Joined: Sat May 13, 2006 11:51 am
Location: Atacames
Contact:

Re: mod_HelloWorld tutorial - pat template error

Post by elkuku » Thu Apr 22, 2010 5:42 pm

Hello and welcome to the forum ;)
You have just posted in a really old thread.. nobody knows which J! version they were talking about.. But anyway - great that your module works.
If you experience any problems when developing Joomla! extensions you may try EasyCreator which speeds up things a lot.. 8)

Happy coding,
Nikolai


Locked

Return to “docs.joomla.org - Feedback/Information”