Smarty gives Fatal error on editing .tpl file

user3354766

I am facing a problem whenever I edit my header-home.tpl file (even space or comment line) it says

Fatal error: Smarty error: [in header-home.tpl.html line 114]: syntax error: unrecognized tag: i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments) (Smarty_Compiler.class.php, line 415) in D:\xampplite\TFS-WorkSpace\EventCompany\lib\modules\Smarty\libs\Smarty.class.php on line 999

but when I edit any other file like contact.tpl.html it works fine.

I tried disabling $smarty->compile_check = false; but no success. Help me

Header.tpl.html code

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

    <title>Event Planning Agency, Event Manager Services, Corporate Event Management, Exhibition, Conference, Party Organiser in Dubai, UAE | The Event Company</title>
    <meta name="description" content="The-Event-Company.com offers Event Management, Conference Management, Sponsorship Activation, Promotional Events, Event Furniture/Prop Hire, Launch Events, Mall Events, Exhibition Stand Design, Exhibition Management, Catering Service, RSVP Management and Wedding Planning in Dubai. Call us at +971 4 304 2468 and we will plan a personalized agenda for your event today." />
    <meta name="keywords" content="Event Planning, Event manager, Event Services, Corporate Events, Party Event Planning, Corporate Event Planning, Event Planning Services, Event Management Services, Corporate Event Management, Exhibition Management, The Event Company, Event Management Dubai, Dubai Event Management, Event Planning Service, Event Management Agency, Corporate Event Services, Event Company Dubai, Event Company Dubai, UAE event management, Furniture Hire Dubai, Conference Management Agency, Event organiser Dubai, Party Planning Dubai, Promotional Staff Dubai, Event Planning UAE, Event manager UAE, Event Services UAE, Corporate Events UAE, Party Event Planning UAE, Corporate Event Planning UAE, Exhibition Management UAE, Event Planning Service UAE, Event Management Agency UAE, Corporate Event Services UAE, Furniture Hire Dubai UAE, Conference Management Agency UAE, Event organiser Dubai UAE, Party Planning Dubai UAE, Promotional Staff Dubai UAE, Event Planning Dubai, Event manager Dubai, Event Services Dubai, Corporate Events Dubai, Party Event Planning Dubai, Corporate Event Planning Dubai, Corporate Event Management Dubai, Exhibition Management Dubai, Event Management Agency Dubai, Corporate Event Services Dubai, UAE event management Dubai, Furniture Hire Dubai " />

    <link type="text/css" rel="stylesheet" href="css/style.css"/>   
    <link rel="stylesheet" type="text/css" href="script/jqueryslidemenu.css" />

    {literal}
        <!--[if lte IE 7]>
        <style type="text/css">
            html .jqueryslidemenu{height: 1%;} /*Holly Hack for IE7 and below*/

            div#prevBtn {
            height:22px;
            float:left;
            width:15px;
            margin-top:-45px;
            padding:2px 0 0 10px;
            margin-left:320px;
            color:#b7b6a0;
        }
        div#nextBtn{ 
            height:22px;
            float:left;
            width:17px;
            padding:2px 0 0 8px;
            margin-top:-45px;
            margin-left:360px;
            color:#b7b6a0 !important;
        }   

        .staff-detail   {
            width:600px;
            padding:0px 10px 0px 10px;
            color:#000000;
            line-height:16px;
            margin-top:-75px;
            float:left;
        }

        #image-form-container .forms span   {

            font-size:13px;

        }

        </style>
        <![endif]-->
    {/literal}

    <!--<script type="text/javascript" src="script/jquery.min.js"></script>
    <script type="text/javascript" src="script/jqueryslidemenu.js"></script>
    <script type="text/javascript" src="script/jquery.js"></script>
    <script src="script/easySlider.packed.js" type="text/javascript"></script>
    <script src="script/easySlider.packed_news.js" type="text/javascript"></script>-->

    <script type="text/javascript" src="js/jquery.js"></script>
    <script type="text/javascript" src="js/easySlider.js"></script>
    <script type="text/javascript" src="js/fadeSlideShow.js"></script>


    {literal}



        <script type="text/javascript">
$(document).ready(function(){

    var imgArray = [ 'homeimg1', 'homeimg2', 'homeimg3', 'homeimg4', 'homeimg5' ];
    imgArray.sort(function () { return 0.5 - Math.random(); }); // shuffle the array
    for(var i = 0; i < 5; i++) {
        $('#slideshow').prepend('<li><img src="img/'+ imgArray[i] +'.jpg" alt="" /></li>');
    }

    $('#slideshow').fadeSlideShow({
        width: 980,
        height: 386,
        speed: 600, //'slow'
        interval: 6000,
        PlayPauseElement: false,
        NextElement: false,
        PrevElement: false,
        addListToId: false
    });

    $("#slider").easySlider({
        speed: 800,
        auto: true,
        pause: 5000,
        continuous: true
    });
});
</script>



    {/literal}



    <link type="text/css" rel="stylesheet" href="css/main.css"/>
    <link type="text/css" rel="stylesheet" href="highslide/highslide.css"/>
    <script type="text/javascript" src="highslide/highslide.js"></script>
    <script type="text/javascript" src="script/validation.js"></script>
    <script src="script/AC_RunActiveContent.js" type="text/javascript"></script>

    <script type="text/javascript">
    (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
    (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
    m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
    })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

    ga('create', 'UA-57139118-1', 'auto');
    ga('send', 'pageview');

    </script>

</head>

<body>
    <div id="wrapper">


    <div id="top">

        <a href="/" title="Back to Homepage" id="logo"><img src="img/logo.gif" alt="Back to Homepage" /></a>

        <ul id="topMenu">
            <li><a href="/" class="act">Home</a></li>
            <li><a href="main.php?pg=hwdi">About Us</a></li>
            <li><a href="event.php?arch=no&nid=4&fs=7" {if $article eq 'service'} class=act {/if}>Services</a></li>
            <li><a href="clients.php">Clients</a></li>
            <li><a href="regional-coverage.php">Regional Coverage</a></li>
            <li class="last"><a href="contact.php">Contact Us</a></li>
        </ul>

        <div class="cleaner"></div>
    </div>  




    <div id="content"><div class="content">

        <div id="homeImg">
            <div class="overlay"></div>
            <ul id="slideshow">
            </ul>
        </div>

        <div id="ourClients">
            <h3>Our Satisfied Clients</h3>

            <div id="sliderHolder"><div id="slider"><ul>    
                <li><a href="clients.php"><img src="img/clients/our-clients1.jpg" alt="Our Satisfied Clients" /></a></li>
                <li><a href="clients.php"><img src="img/clients/our-clients2.jpg" alt="Our Satisfied Clients" /></a></li>
                <li><a href="clients.php"><img src="img/clients/our-clients3.jpg" alt="Our Satisfied Clients" /></a></li>
                <li><a href="clients.php"><img src="img/clients/our-clients4.jpg" alt="Our Satisfied Clients" /></a></li>
                <li><a href="clients.php"><img src="img/clients/our-clients5.jpg" alt="Our Satisfied Clients" /></a></li>
                <li><a href="clients.php"><img src="img/clients/our-clients6.jpg" alt="Our Satisfied Clients" /></a></li>
                <li><a href="clients.php"><img src="img/clients/our-clients7.jpg" alt="Our Satisfied Clients" /></a></li>
            </ul></div></div>

        </div>

        <div id="aboutCompany">
            <h3>{$title}</h3>

            <div class="l">{$CONTENT[0]|sslash}</div>

            <div class="r" style="margin-top:-30px;">{$CONTENT[1]|sslash}</div>

            <div class="cleaner"></div>
        </div>

    </div></div>

Thanks

pavel

It seems like a JS, so you need to wrap that with {literal}.

{literal}
<script type="text/javascript">
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');

ga('create', 'UA-57139118-1', 'auto');
ga('send', 'pageview');

</script>
{/literal}

Without using {literal} tag you need to write {ldelim} and {rdelim}, instead of { and }.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Issues with .TPL file with Smarty

From Dev

How to fix error "Fatal error: Uncaught --> Smarty: unable to write file"?

From Dev

smarty tpl file does not read the tpl file properly

From Dev

PHP Fatal error: Uncaught --> Smarty

From Dev

Is it possible to use smarty template without tpl file?

From Dev

if else gives fatal error

From Dev

cimport gives fatal error: 'numpy/arrayobject.h' file not found

From Dev

Whmcs call a php script in a tpl file using smarty variables

From Dev

Add week in smarty tpl

From Dev

Add week in smarty tpl

From Dev

PHP Fatal error: Smarty error: syntax error: unidentified token '='

From Dev

Editing system-connections/Hotspot file gives authorisation error while connecting Ubuntu Hotspot

From Dev

How to avoid FATAL error in Smarty templates while we check for objects

From Dev

How to fix Prestashop Fatal error: Uncaught --> Smarty Compiler?

From Dev

Fatal error : Cannot use [] for reading using smarty template

From Dev

fatal error no such file or directory

From Dev

login to postgres as another user gives FATAL error

From Dev

login to postgres as another user gives FATAL error

From Dev

molden install gives fatal compilation error

From Dev

fatal error: filesystem: No such file or directory

From Dev

Why I get "Fatal error: in ...smarty_internal_templatecompilerbase.php on line 8" error message?

From Dev

Using smarty template (*.tpl) what is {#name#}

From Dev

Passing Array from php to Smarty .tpl

From Dev

make a variable in smarty tpl using section

From Dev

Passing Array from php to Smarty .tpl

From Dev

PHP Amazon Ses as an abstract class gives use fatal error

From Dev

New Symfony2 User Class gives Fatal Error

From Dev

Chef gives fatal error when running killall in bash

From Dev

Codecept installation gives me an fatal error (bz2 extension)

Related Related

  1. 1

    Issues with .TPL file with Smarty

  2. 2

    How to fix error "Fatal error: Uncaught --> Smarty: unable to write file"?

  3. 3

    smarty tpl file does not read the tpl file properly

  4. 4

    PHP Fatal error: Uncaught --> Smarty

  5. 5

    Is it possible to use smarty template without tpl file?

  6. 6

    if else gives fatal error

  7. 7

    cimport gives fatal error: 'numpy/arrayobject.h' file not found

  8. 8

    Whmcs call a php script in a tpl file using smarty variables

  9. 9

    Add week in smarty tpl

  10. 10

    Add week in smarty tpl

  11. 11

    PHP Fatal error: Smarty error: syntax error: unidentified token '='

  12. 12

    Editing system-connections/Hotspot file gives authorisation error while connecting Ubuntu Hotspot

  13. 13

    How to avoid FATAL error in Smarty templates while we check for objects

  14. 14

    How to fix Prestashop Fatal error: Uncaught --> Smarty Compiler?

  15. 15

    Fatal error : Cannot use [] for reading using smarty template

  16. 16

    fatal error no such file or directory

  17. 17

    login to postgres as another user gives FATAL error

  18. 18

    login to postgres as another user gives FATAL error

  19. 19

    molden install gives fatal compilation error

  20. 20

    fatal error: filesystem: No such file or directory

  21. 21

    Why I get "Fatal error: in ...smarty_internal_templatecompilerbase.php on line 8" error message?

  22. 22

    Using smarty template (*.tpl) what is {#name#}

  23. 23

    Passing Array from php to Smarty .tpl

  24. 24

    make a variable in smarty tpl using section

  25. 25

    Passing Array from php to Smarty .tpl

  26. 26

    PHP Amazon Ses as an abstract class gives use fatal error

  27. 27

    New Symfony2 User Class gives Fatal Error

  28. 28

    Chef gives fatal error when running killall in bash

  29. 29

    Codecept installation gives me an fatal error (bz2 extension)

HotTag

Archive