Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Fatal error: Uncaught exception 'SmartyCompilerException'

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Installation and Setup
View previous topic :: View next topic  
Author Message
Tsukkie
Smarty Rookie


Joined: 31 Jul 2013
Posts: 7

PostPosted: Wed Jul 31, 2013 7:33 pm    Post subject: Fatal error: Uncaught exception 'SmartyCompilerException' Reply with quote

So im going through a lot of trouble solving this.
http://imageshack.us/photo/my-images/855/po42.jpg/
***application.php
<?php
// Reference Smarty library
require_once SMARTY_DIR . 'Smarty.class.php';

/* Class that extends Smarty, used to process and display Smarty
files */
class Application extends Smarty
{
// Class constructor
public function __construct()
{
// Call Smarty's constructor
parent::__construct();

// Change the default template directories
$this->setTemplateDir(TEMPLATE_DIR);
$this->setCompileDir(COMPILE_DIR) ;
$this->setConfigDir(CONFIG_DIR);
$this->setPluginsDir(array(SMARTY_DIR . 'plugins,', PRESENTATION_DIR . 'smarty_plugins'));
}
}
?>


***index.php
<?php
// Include utility files
require_once 'include/config.php';
require_once BUSINESS_DIR . 'error_handler.php';

// Set the error handler
ErrorHandler::SetHandler();

// Load the application page template
require_once PRESENTATION_DIR . 'application.php';
//require_once PRESENTATION_DIR . 'link.php';

// Load the database handler
require_once BUSINESS_DIR . 'database_handler.php';

// Load Business Tier
require_once BUSINESS_DIR . 'catalog.php';

// Load Smarty template file
$application = new Application();

// Display the page
$application->display('store_front.tpl');

// Close database connection
DatabaseHandler::Close();
?>


Trying to finish this for my capstone. I am using wamp over xamp also
Back to top
View user's profile Send private message
mohrt
Administrator


Joined: 16 Apr 2003
Posts: 7368
Location: Lincoln Nebraska, USA

PostPosted: Wed Jul 31, 2013 7:46 pm    Post subject: Reply with quote

I can barely make out the error message in that photo, but it looks like you have a syntax error in your template (?)
Back to top
View user's profile Send private message Visit poster's website
Tsukkie
Smarty Rookie


Joined: 31 Jul 2013
Posts: 7

PostPosted: Thu Aug 01, 2013 9:33 am    Post subject: Reply with quote

Im not sure about the template. its the one I download from smarty. I checked the line and cant see what is wrong with it
Back to top
View user's profile Send private message
U.Tews
Administrator


Joined: 22 Nov 2006
Posts: 5068
Location: Hamburg / Germany

PostPosted: Thu Aug 01, 2013 9:49 am    Post subject: Reply with quote

The error Message in your jpg is Not readable.
What ist the error message?
Back to top
View user's profile Send private message
Tsukkie
Smarty Rookie


Joined: 31 Jul 2013
Posts: 7

PostPosted: Thu Aug 01, 2013 4:02 pm    Post subject: Reply with quote

( ! ) Fatal error: Uncaught exception 'SmartyCompilerException' with message ' in C:\wamp\www\tshirtshop\libs\smarty\sysplugins\smarty_internal_templatecompilerbase.php on line 667
( ! ) SmartyCompilerException: Syntax Error in template &quot;c:wamp\www\tshirtshop\presentation\templates\store_front.tpl&quot; on line 33 &quot;&quot; - Unexpected &quot;department_list.tpl} &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt; &quot; in C:\wamp\www\tshirtshop\libs\smarty\sysplugins\smarty_internal_templatecompilerbase.php on line 667
Back to top
View user's profile Send private message
mohrt
Administrator


Joined: 16 Apr 2003
Posts: 7368
Location: Lincoln Nebraska, USA

PostPosted: Thu Aug 01, 2013 4:23 pm    Post subject: Reply with quote

What does store_front.tpl look like? somewhere around line 33.
Back to top
View user's profile Send private message Visit poster's website
mohrt
Administrator


Joined: 16 Apr 2003
Posts: 7368
Location: Lincoln Nebraska, USA

PostPosted: Thu Aug 01, 2013 4:26 pm    Post subject: Reply with quote

This:

Code:
Unexpected "department_list.tpl}


Makes me think you are missing a quote just before the closing brace.
Back to top
View user's profile Send private message Visit poster's website
Tsukkie
Smarty Rookie


Joined: 31 Jul 2013
Posts: 7

PostPosted: Thu Aug 01, 2013 4:34 pm    Post subject: Reply with quote

the quote! ty so much! iwish notepadd++ has intellencense

You guys are awesome!
Back to top
View user's profile Send private message
Tsukkie
Smarty Rookie


Joined: 31 Jul 2013
Posts: 7

PostPosted: Thu Aug 01, 2013 4:40 pm    Post subject: Reply with quote

but i am getting one more error =/

ERRNO: 2
TEXT: filemtime(): stat failed for c:wamp/www/tshirtshop/presentation/templates_c\e6ce78d75661933d805bcd0a8636ec0bb661810e.file.departments_list.tpl.php
LOCATION: C:\wamp\www\tshirtshop\libs\smarty\sysplugins\smarty_resource.php, line 720, at August 1, 2013, 4:32 pm
Showing backtrace:
filemtime("c:wamp/www/tshirtshop/presentation/templates_c\e6ce78d75661933d8...") # line 720, file: C:\wamp\www\tshirtshop\libs\smarty\sysplugins\smarty_resource.php
Smarty_Template_Source.getCompiled(Object: Smarty_Internal_Template) # line 659, file: C:\wamp\www\tshirtshop\libs\smarty\sysplugins\smarty_internal_template.php
Smarty_Internal_Template.__get("compiled") # line 154, file: C:\wamp\www\tshirtshop\libs\smarty\sysplugins\smarty_internal_templatebase.php
Smarty_Internal_TemplateBase.fetch(null, null, null, null, false, false, true) # line 286, file: C:\wamp\www\tshirtshop\libs\smarty\sysplugins\smarty_internal_template.php
Smarty_Internal_Template.getSubTemplate("departments_list.tpl", null, null, null, null, Array[0], "0") # line 49, file: C:\wamp\www\tshirtshop\presentation\templates_c\86ea552304ced606ea5a8d94e03ae6811529b8c4.file.store_front.tpl.php
content_51f1774f335805_21317413(Object: Smarty_Internal_Template) # line 180, file: C:\wamp\www\tshirtshop\libs\smarty\sysplugins\smarty_internal_templatebase.php
Smarty_Internal_TemplateBase.fetch("store_front.tpl", null, null, null, true) # line 374, file: C:\wamp\www\tshirtshop\libs\smarty\sysplugins\smarty_internal_templatebase.php
Smarty_Internal_TemplateBase.display("store_front.tpl") # line 23, file: C:\wamp\www\tshirtshop\index.php
Back to top
View user's profile Send private message
mohrt
Administrator


Joined: 16 Apr 2003
Posts: 7368
Location: Lincoln Nebraska, USA

PostPosted: Thu Aug 01, 2013 5:10 pm    Post subject: Reply with quote

Code:
filemtime(): stat failed


Looks like file was deleted that it was expecting. Did you clear out cache/compiled files and then see this happen? Is the error consistent when you reload the page?

You might see short-lived notices like this if you clear out compiled or cached files on a live system.
Back to top
View user's profile Send private message Visit poster's website
Tsukkie
Smarty Rookie


Joined: 31 Jul 2013
Posts: 7

PostPosted: Thu Aug 01, 2013 5:33 pm    Post subject: Reply with quote

how do i clear cache/compiled files? this error is consistent everytime i reload the page.
Back to top
View user's profile Send private message
U.Tews
Administrator


Joined: 22 Nov 2006
Posts: 5068
Location: Hamburg / Germany

PostPosted: Fri Aug 02, 2013 8:34 am    Post subject: Reply with quote

Delete all Files in the template_c and cache subfolder
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Installation and Setup All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP