Uutiset:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu
Advertisement:

Stuck on the "Unable to load the 'main' template." Error

Aloittaja HenningK, lokakuu 21, 2011, 11:37:35 AP

« edellinen - seuraava »

HenningK

Hi folks,

I'm very familiar with PHP but I've never worked on SMF 2 Addons. I already failed at the very beginning and I bet it's a stupid mistake I'm doing.
For shure I searched for the error and you find hundreds of threads with this topic, but most of them are about people installing addons and are not going into the code, others are not even answered.

So it's described easily:
1. create Sources/Test.php & themes/default/test.template.php
2. add a line to the array in index.php with the function inside the Test.php
3. open the action=test
4. find the "Unable to load the 'main' template." error

What step did I forgot?
I'm really sorry for this question, but it's urgent.

regards

edit:
of course i found the problem a minute after posting this.
Add a loadTemplate('Test'); to the Controller and the template_main() function in the View, and you're done.
Sorry, as easy as i said above

kat

Glad you got it sorted, Henning!

Welcome to the ol' forum, anyway! :)

Enemy1

I got our testsite stuck on this error and would like to know were these code-parts should be added ..
Please :D

Illori

please open a separate thread for your issue, this thread belongs to someone else and is marked solved.

vietravel247.com

Thank you very much, read this topic I fixed my site with error unable to load the 'main' template.
(http://www.simplemachines.org/community/index.php?topic=249690.460)

Advertisement: