Unable to load template file 'template.tpl''

Forum
Last Post
Threads / Messages

Demonwolf37

Trans with a plan
Member
Joined
Sep 8, 2016
Messages
20
Points
0
Age
26
Mysidian Dollar
0
After following this tip (http://www.mysidiaadoptables.com/forum/showthread.php?t=4763) to remove the blank page error, I'm now getting this error, which is very straining on the eyes and quite beyond me.

Fatal error: Uncaught exception 'SmartyException' with message 'Unable to load template file 'template.tpl'' in /home/summonad/public_html/inc/smarty/sysplugins/smarty_internal_templatebase.php:127 Stack trace: #0 /home/summonad/public_html/inc/smarty/sysplugins/smarty_internal_templatebase.php(374): Smarty_Internal_TemplateBase->fetch('template.tpl', NULL, NULL, NULL, true) #1 /home/summonad/public_html/classes/class_template.php(135): Smarty_Internal_TemplateBase->display('template.tpl') #2 /home/summonad/public_html/classes/class_view.php(280): Template->output() #3 /home/summonad/public_html/classes/class_frontcontroller.php(102): View->render() #4 /home/summonad/public_html/index.php(74): FrontController->render() #5 /home/summonad/public_html/index.php(78): IndexController::main() #6 {main} thrown in /home/summonad/public_html/inc/smarty/sysplugins/smarty_internal_templatebase.php on line 127

I seem to be getting errors everywhere, actually, but that's besides the point... On the Login page, I'm getting this error, even though the phrase 'AppController' does indeed appear on line 3.

Fatal error: Class 'AppController' not found in /home/summonad/public_html/login.php on line 3
________

I have very limited coding skills, and my coding expert does not know php very well. If I'm having this much trouble just getting the site set up, I'm worried I won't be able to make a site at all. It's been a very trying and discouraging first day, so I'd appreciate some feedback.
 
The problem is actually not That line... your issue is template.tpl.

" 'Unable to load template file 'template.tpl''"

Do you have it in the right spot?

Public html-> Templates-> (name of template folder)-> Template.tpl

those other errors are if I recall just errors because the first error is happening- so its causing the others.
 
template.tpl is indeed in public_html/templates/main, although I recall setting the "main" template to "default". Changing the folder name to "default" (thus creating public_html/templates/default) did not create any change in the error message.

To me it looks like there's something wrong with the paths, but then again, I have next to none php skills, so I'm still at a bit of a loss.
 
Last edited:
Maybe it's time I searched YouTube for "learn php code fast!" videos XD. I think I'll take a break and then go through each line of error and see if I can deduce anything... Because to me it looks like it's trying to find template.tpl in smarty_internal_templatebase.php on line 127, which to me would imply there's something wrong with the path that it can't find it... And same with the error lines following it.

I guess I'll just have to go through it all unless anyone has any ideas...
 
Codeacademy is one most people point me to- but it just confuses me more-

Also theres Php checkers online that I use quite a bit to pinpoint the issues... Or just copy pasting the main "error" into google.
 
I might have to take a look at Codeacademy later. I don't know if php checkers will work if it involves paths between different files, but I'll look into it. For now I just have the error message reformatted so it's a little easier to read, and my evaluation of each.

Fatal error:
Uncaught exception 'SmartyException' with message 'Unable to load template file 'template.tpl'' in /home/summonad/public_html/inc/smarty/sysplugins/smarty_internal_templatebase.php:127
Stack trace:
#0 /home/summonad/public_html/inc/smarty/sysplugins/smarty_internal_templatebase.php(374): Smarty_Internal_TemplateBase->fetch('template.tpl', NULL, NULL, NULL, true)
#1 /home/summonad/public_html/classes/class_template.php(135): Smarty_Internal_TemplateBase->display('template.tpl')
#2 /home/summonad/public_html/classes/class_view.php(280): Template->output()
#3 /home/summonad/public_html/classes/class_frontcontroller.php(102): View->render()
#4 /home/summonad/public_html/index.php(74): FrontController->render()
#5 /home/summonad/public_html/index.php(78): IndexController::main()
#6 {main} thrown in /home/summonad/public_html/inc/smarty/sysplugins/smarty_internal_templatebase.php on line 127


Lines 121-127 of smarty_internal_template
if (!$_template->source->exists) {
if ($_template->parent instanceof Smarty_Internal_Template) {
$parent_resource = " in '{$_template->parent->template_resource}'";
} else {
$parent_resource = '';
}
throw new SmartyException("Unable to load template {$_template->source->type} '{$_template->source->name}'{$parent_resource}");

Looks as though it's unable to locate the template through the source (whatever that is...). I think this is the major error that's going on here.

#0: Line 374 of smarty_internal_template
$this->fetch($template, $cache_id, $compile_id, $parent, true);
I assume it can't fetch the template because of the previous error.

#1: Line 135 of class_template
$this->display("template.tpl");
Obviously it can't display the template because the previous code can't fetch it.

#2: Lines 276-28 of class_view
public function render(){
if(!$this->template) throw new ViewException("Template engine not found, view cannot be rendered.");
$this->template->setTheme($this->theme);
$this->template->render();
$this->template->output();

Honestly, I have no idea with this one. All I can see is that "Template engine not found, view cannot be rendered." is not displayed in the error, so that probably means the problem does not lie on that line... Other than that I really don't know.

#3: class_controller, lines 96-102
public function render(){
if($this->flags) $this->view->triggerError($this->flags);
else{
$action = ($this->action)?(string)$this->action:"index";
$this->view->$action();
}
$this->view->render();

I have no clue with this one. Something with the index maybe?

#4: 67-74 of index.tpl
public static function main(){
$init = new Initializer;
$mysidia = Registry::get("mysidia");
$index = new IndexController;
if($index->getRequest()) $index->handleRequest();
else $index->index();
$index->getView();
$index->render();

I'm not really sure what's going on here at all... Index stuff...

#5: Line 78 of index.php
IndexController::main();
This... might be a major source of the problem? Maybe? I remember in the installation, I renamed the "main" template to "default" instead. So if that's the same "main", then maybe that's part of the problem?

#6 {main}: Same as the one before the numbers, it can't seem to find template.tpl for whatever reason.



If anyone has any ideas, I'd really appreciate it!

Okay, so looking at this thread (http://www.mysidiaadoptables.com/forum/showthread.php?t=5177) tells me that I've specified the wrong/nonexistent theme name (probably when I installed this and changed "main" to "default"). So how do I correct this? Do I re-upload the install folder and go through the installation process again?

Trying to re-upload the installer and going to summonadopts.elementfx.com/install/ gives me this error: Warning: require(../inc/config.php): failed to open stream: No such file or directory in /home/summonad/public_html/classes/class_initializer.php on line 97

Warning: require(../inc/config.php): failed to open stream: No such file or directory in /home/summonad/public_html/classes/class_initializer.php on line 97

Fatal error: require(): Failed opening required '../inc/config.php' (include_path='.:/opt/alt/php55/usr/share/pear:/opt/alt/php55/usr/share/php') in /home/summonad/public_html/classes/class_initializer.php on line 97


I DID change the config.php permissions back to 777 beforehand. I guess I'm goint to delete everything and reupload everything with FireZilla AGAIN. (this is the third time I've done that, it's getting annoying)
 
Reuploading fixed the problem. Now I have DIFFERENT problems to work out -_-
 

Similar threads

Users who are viewing this thread

  • Forum Contains New Posts
  • Forum Contains No New Posts

Forum statistics

Threads
4,277
Messages
33,118
Members
1,602
Latest member
BerrieMilk
BETA

Latest Threads

Top