Loading...
 
Skip to main content

Architecture / Installation


Recommended gAnalytics code causes Smarty Exception [SOLVED]

Hello,

to enable Google Analytics tracking I copied the code snippet from:
http://doc.tiki.org/PluginGoogleAnalytics&structure=Documentation+TOC#Since_Tiki3Question
(see the second tip under No. 3) as described in the "end of code" text field and clicked "apply".

Since then, I get this error message on all pages — and what is more I cannot revert the change because I cannot access the Tiki instance anymore. Help!

gAnalytics javascript
Copy to clipboard
Fatal error: Uncaught exception 'SmartyCompilerException' with message 'Syntax Error in template "11838262deb1be0855412d63d90f54c8c07e96e1" on line 15 "{literal}<script type="text/javascript">" missing or misspelled literal closing tag' in /home/digisus/public_html/teach/lib/smarty/libs/sysplugins/smarty_internal_templatecompilerbase.php:656 Stack trace: #0 /home/digisus/public_html/teach/lib/smarty/libs/sysplugins/smarty_internal_templatelexer.php(994): Smarty_Internal_TemplateCompilerBase->trigger_template_error('missing or miss...') #1 /home/digisus/public_html/teach/lib/smarty/libs/sysplugins/smarty_internal_templatelexer.php(916): Smarty_Internal_Templatelexer->yy_r3_7(Array) #2 /home/digisus/public_html/teach/lib/smarty/libs/sysplugins/smarty_internal_templatelexer.php(99): Smarty_Internal_Templatelexer->yylex3() #3 /home/digisus/public_html/teach/lib/smarty/libs/sysplugins/smarty_internal_smartytemplatecompiler.php(100): Smarty_Internal_Templatelexer->yylex() #4 /home/digisus/public_html/teach/lib/ in /home/digisus/public_html/teach/lib/smarty/libs/sysplugins/smarty_internal_templatecompilerbase.php on line 656


I guess I need to access the db directly and get this piece of code out, but I have no idea where to loook for it. Can anyone please advise me on this? As the site needs to go live very soon I am thankful for any fast responses!

Thanks a lot!
digisus

If you can access the database directly, you can easily fix this. See my primerQuestion for details.

As for why the code broke Tiki, it appears that you have an opening {literal} without the required closing {/literal} statement. You should always make sure that your code is valid, before applying it.

HTH,

- RickQuestion | My Tiki Blog | My Tiki UserPage

Why be a dummy? Get smarty! TikiForSmarties.comQuestion
Tiki for SmartiesQuestion, your source for the best (and only) Tiki books, guides, and tutorials.

ricks99,
thank you very much, exactly what I needed! Very informative page, btw. 😊

BUT ... it still does not work?! I emptied the text field in the database using phpmyadmin, but the identical error message still occurs?? I do not understand...

Is there a mechanism to flush the db or something? I emptied browser cache and tried several times but to no avail. No idea what else I should try. 😑

Thanks for any hints!
digisus

Great, thank you Rick! That did the trick. 😊