- Priority: 0
- Status: Closed
- Theme: Alysum
-
Assigned To:
Fred
- Private: No
- Open Date: 11.12.19, 17:47
- Opened by: Sophia Kulakova
- Closed by: Fred
- Closed on: 01.02.20, 14:07
- Reason: No answer from a customer
- Comment: Glad to help!
Ticket #16431 - The problem with the installation code
Hello. I need to put a metric code on the site to track visitors. However, the topic does not allow. The support team on my hosting called this problem:
PHP Fatal error: Uncaught –> Smarty Compiler: Syntax error in template “file:/home/s/skulakova/amberheart.ru/public_html/themes/alysum/templates/mobile/_partials/footer.tpl” on line 75 “(function (m,e,t,r,i,k,a){m[i]=m[i]||function () {(m[i].a=m[i].a||[]).push (arguments)};” - Unexpected " [ " , expected one of:”}” ←-
thrown in /home/s/skulakova/amberheart.ru/public_html/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatecompilerbase.php on line 75
They say the cause of the problem is a metric code error
<!-- Yandex.Metrika counter --> <script type="text/javascript" > (function(m,e,t,r,i,k,a){m[i]=m[i]||function(){(m[i].a=m[i].a||[]).push(arguments)}; m[i].l=1*new Date();k=e.createElement(t),a=e.getElementsByTagName(t)[0],k.async=1,k.src=r,a.parentNode.insertBefore(k,a)}) (window, document, "script", "https://mc.yandex.ru/metrika/tag.js", "ym"); ym(55077997, "init", { clickmap:true, trackLinks:true, accurateTrackBounce:true, webvisor:true, trackHash:true, ecommerce:"dataLayer" }); </script> <noscript><div><img src="https://mc.yandex.ru/watch/55077997" style="position:absolute; left:-9999px;" alt="" /></div></noscript> <!-- /Yandex.Metrika counter -->
They Copied the source file themes/alyssum/templates/mobile/_partials/footer.tpl in themes/alyssum/templates/mobile/_partials/footer.tpl123. From the source removed this code, starting with line 75, the error disappeared.
Now I need to update this code, but the hosting support service can not help me. You will be able to fix this error and install the code.
Comments
Hi, Sophia.
Try to add literals before the code, like this:
Strange inserted codes. Error code
my code metrics which you need to put
I added, it doesn’t help
Please fill out all necessary fields in your profile https://support.promokit.eu/index.php?do=myprofile to access to your server through FTP
used to add literal and nothing worked, now I did as you said and everything worked. Perhaps something has changed in the code itself because of their update. I filled out all the fields. Could you check if I have everything working correctly
All seems ok there
And can I still find out why I have a computer version. rating stars are not displayed. Only the squares are empty.
And Google issues that the site has such errors: Missing field” rating value”; The value specified for the “reviewCount” data item must be positive. Set a value for one of the following data items: “offers”, “review”, or “aggregating”.
Attachments:
Без имени-2.jpg(228.5 KiB)Hi, Sophia.
Sorry, seems I missed your ticket. We already have a solution, but I need FTP access to implement it