Jump to content

Fatal error: Uncaught exception SmartyCompilerException with message Syntax Error in template


Recommended Posts

I just did a clean install of the latest PS version. Install appeared to go ok. Deleted install folder and renamed my admin folder. The BO would not load. Error reporting shows this...

 

Fatal error: Uncaught exception 'SmartyCompilerException' with message 'Syntax Error in template "/home/content/65/9992365/html/mysites/poshtreasures/admin843/themes/default/template/header.tpl" on line 150 "<a class="employee" href="index.php?controller=AdminEmployees&amp;id_employee={$employee-&gt;id}&amp;updateemployee&amp;token={getAdminToken tab='AdminEmployees'}" alt="">{l s='My preferences'}</a>" - Unexpected "&"' in /home/content/65/9992365/html/mysites/poshtreasures/tools/smarty/sysplugins/smarty_internal_templatecompilerbase.php:627 Stack trace: #0 /home/content/65/9992365/html/mysites/poshtreasures/tools/smarty/sysplugins/smarty_internal_templateparser.php(3154): Smarty_Internal_TemplateCompilerBase->trigger_template_error() #1 /home/content/65/9992365/html/mysites/poshtreasures/tools/smarty/sysplugins/smarty_internal_templateparser.php(3219): Smarty_Internal_Templateparser->yy_syntax_error(41, '&') #2 /home/content/65/9992365/html/mysites/poshtreasure in /home/content/65/9992365/html/mysites/poshtreasures/tools/smarty/sysplugins/smarty_internal_templatecompilerbase.php on line 627

 

I tried uninstalling and reinstalling EVERYTHING (dumped the database too) from scratch and still get this error. Help?

Link to comment
Share on other sites

Hello,

 

Can I have the:

/html/mysites/poshtreasures/admin843/themes/default/template/header.tpl" on line 150

 

Looks like something is terribly wrong with the output. At a glance:

 

id_employee={$employee-&gt;id}

 

Unless I am a magician, this Smarty definition should have been {$employee->id} and not the mess up there with the &gt;, Smary will not like that.

 

BR,

RaPhiuS

Link to comment
Share on other sites

Hello,

 

Can I have the:

/html/mysites/poshtreasures/admin843/themes/default/template/header.tpl" on line 150

 

Looks like something is terribly wrong with the output. At a glance:

 

id_employee={$employee-&gt;id}

 

Unless I am a magician, this Smarty definition should have been {$employee->id} and not the mess up there with the &gt;, Smary will not like that.

 

BR,

RaPhiuS

 

So the question is, how would this problem occur with two clean installs? I just downloaded and installed the software the the day before I made the first post here. Then I re-uploaded everything, dumped the database, and reinstalled with the same problem as the end result. Is there a problem with the current release?

Link to comment
Share on other sites

You need to provide a bit more details around what you experience exactly... I have the latest release of Prestashop and all works smooth both local and on 2 different official hosts companies.

 

Therefore:

- Can you please specify the Prestashop version you are trying to install?

- Do you have the same symptom with a local install on your computer?

- Is this problem only happening on your host provider?

- Did you customize any scripts somewhere or are these the baseline package original sources?

- If you changed some files can you please clarify what is the file encoding of your header.tpl? Sometimes, editors, via unwanted triggered shortcuts, changes the file encoding (ie: notepad++).

 

At a first sight, looks to me a problem with the files encoding or whatever else might be related. To ensure this is not the case, copy directly the zip file to your host server and unzip there, this will ensure the files are deflated with appropriate encoding and permissions.

 

Right now, I can just confirm the last package with original sources is just working fine both local and on host servers. Therefore, please provide more information.

 

BR,

RaPhiuS

Edited by RaPhiuS (see edit history)
Link to comment
Share on other sites

As I mentioned, it is the current version. I just downloaded it. I tried two clean installs with the same results. This is not a local installation, it is on GoDaddy shared hosting, Deluxe Linux. I have never had this problem with previous versions of PS on this type of hosting. I just changed hosting to the Economy Linux today and did a third clean install after I re-downloaded, uncompressed, and uploaded fresh files. Same exact results. These are default installations. No custom anything. No changes. Same procedures as all my other PS websites that work fine. The only difference is that this is a newer version of PS.

Link to comment
Share on other sites

Well, I have no idea what happened, but I turned error reporting on and uploaded the defines file, then everything started working on this third install. No errors reported this time. I turned error reporting back off and it still works. Not exactly sure what happened between the error this morning and now, but it seems to be working. So, I guess I can't complain anymore. Sorry I don't have a solution if anyone else encounters this problem.

 

Weird.

Link to comment
Share on other sites

You didnt answer the question if you tried by copying the original zip file directly on the server and uncompress there. Just give it a try for the sake of it.

 

I have the latest package and dont have any errors so i dont see any fault here.

 

BR,

RaPhiuS

Link to comment
Share on other sites

  • 4 months later...
  • 8 months later...

Robert Fowler cybershopdirect.com: 

 

I am getting a similar message.

 

Fatal error: Uncaught exception 'SmartyCompilerException' with message 'Syntax Error in template "/home/cybersho/public_html/modules/homeslider/views/templates/hook/header.tpl" on line 2 "{addJsDef homeslider_loop=$homeslider.loop}" unknown tag "addJsDef"' in /home/cybersho/public_html/tools/smarty/sysplugins/smarty_internal_templatecompilerbase.php:667 Stack trace: #0 /home/cybersho/public_html/tools/smarty/sysplugins/smarty_internal_templatecompilerbase.php(453): Smarty_Internal_TemplateCompilerBase->trigger_template_error('unknown tag "ad...', 2) #1 /home/cybersho/public_html/tools/smarty/sysplugins/smarty_internal_templateparser.php(2388): Smarty_Internal_TemplateCompilerBase->compileTag('addJsDef', Array) #2 /home/cybersho/public_html/tools/smarty/sysplugins/smarty_internal_templateparser.php(3101): Smarty_Internal_Templateparser->yy_r36() #3 /home/cybersho/public_html/tools/smarty/sysplugins/smarty_internal_templateparser.php(3201): Smarty_Internal_Templateparser->yy_reduce(36) #4 /hom in /home/cybersho/public_html/tools/smarty/sysplugins/smarty_internal_templatecompilerbase.php on line 667

Has anyone a solution? I can still get into the admin page and make changes but the site doesn't come up.

Link to comment
Share on other sites

×
×
  • Create New...