Jump to content

Recommended Posts

Hello i have an error on my webpage:

https://www.jinsa.com.mx/

 

The error is this:

 

I tried to install a One Page chechout plugin, and immediatelly after that i got an error 500 . 

I deleted the module folder via FTP and activated DEBUG mode on prestashop and now i got this error:

 


Fatal error: Uncaught --> Smarty: Plugin tag "escape" already registered <-- thrown in /home/u624873126/public_html/vendor/prestashop/smarty/sysplugins/smarty_internal_templatebase.php on line 449

 

Please help me i don't know what to do, this is my first time using prestashop and i already have 1000+ articles on my shop.

Share this post


Link to post
Share on other sites

I hope you uninstalled the module firstly. Some modules create/edit files in the /override directory and this could be your case.

Share this post


Link to post
Share on other sites

I solved it, i went to /vendor/prestashop/smarty/sysplugins/smarty_internal_templatebase.php and on line 449 i commented the line throwing the error and then it let me enter the back office, then i uninstalled the modules, forzed cache and then i uncommented the templatebase file. It is working fine again.

Share this post


Link to post
Share on other sites
On 24/10/2017 at 10:24 AM, metalsniper63 said:

I solved it, i went to /vendor/prestashop/smarty/sysplugins/smarty_internal_templatebase.php and on line 449 i commented the line throwing the error and then it let me enter the back office, then i uninstalled the modules, forzed cache and then i uncommented the templatebase file. It is working fine again.

 

I have the same problem as you man and it didn't work..I did what you did by commenting the line and uninstalling the module but when i uncomment it the error come back..any idea?

Share this post


Link to post
Share on other sites
On 20/2/2018 at 8:36 AM, uniparfum said:

 

I have the same problem as you man and it didn't work..I did what you did by commenting the line and uninstalling the module but when i uncomment it the error come back..any idea?

At the end, i noticed it only happened with Debug mode on. Try to disable debug mode and try again. 

Share this post


Link to post
Share on other sites

Hello,

go to
./config/smarty.config.inc.php

and delete this part :

                        //CODE MODULES PRESTEAMSHOP - PLEASE NOT REMOVE
                        //--------------------------------------------------------------------------------------------------------
                        smartyRegisterFunction($smarty, "modifier", "escape", "escapePTS");
                        function escapePTS($string, $esc_type = "html", $char_set = null, $double_encode = true, $as_html = false)
                        {
                            $smarty_escape = SMARTY_PLUGINS_DIR."modifier.escape.php";
                            include_once $smarty_escape;

                            if (!$as_html && is_callable("smarty_modifier_escape")) {
                                $string = call_user_func("smarty_modifier_escape", $string, $esc_type, $char_set, $double_encode);
                            }

                            return $string;
                        }
                        //--------------------------------------------------------------------------------------------------------
                   

that will work ;)

  • Like 1

Share this post


Link to post
Share on other sites

A big thank you to you, @samiker because I got the same error after upgrading to PS17.5.2, and I spend a half-day to try to find how to fix it... which drive me totally nuts.

Hopefully I find your thread with the naughty bit of code from PRESTEAMSHOP inserted at the end of the file smarty.config.inc.php

This bunch of coding lines comes probably from the Presteamshop's module "Filter Product Pro", removed since 3 months, but apparently, even by uninstalling it properly (I mean the Prestashop's way), all was not removed.

Once again, a huge thank you

Nalika

Share this post


Link to post
Share on other sites

I had the same issue happen to me and I comment the Smarty code which allowed me the get past the error 500. but where you able to use to one page checkout after?

Share this post


Link to post
Share on other sites

Holy @samiker you just save me from a nervous meltdown! Thank YOU!!!

Share this post


Link to post
Share on other sites

Hi, i'm building a new ecommerce and got this fatal error on my back office as well:

[PrestaShop] Fatal error in module file: /homepages/3/d639459114/htdocs/clickandbuilds/PrestaShop/MyeCommerce2/vendor/twig/twig/src/Cache/FilesystemCache.php:57
Uncaught SmartyException: unable to create directory /homepages/3/d639459114/htdocs/clickandbuilds/PrestaShop/MyeCommerce2/var/cache/prod/smarty/compile/e6/07/14 in /homepages/3/d639459114/htdocs/clickandbuilds/PrestaShop/MyeCommerce2/vendor/smarty/smarty/libs/sysplugins/smarty_internal_runtime_writefile.php:51 Stack trace: #0 /homepages/3/d639459114/htdocs/clickandbuilds/PrestaShop/MyeCommerce2/vendor/smarty/smarty/libs/sysplugins/smarty_template_compiled.php(209): Smarty_Internal_Runtime_WriteFile->writeFile('/homepages/3/d6...', 'write(Object(SmartyCustomTemplate), 'compileTemplateSource(Object(SmartyCusto

 

is there any chance you guys help me? Since I tried to install an old donate module everything is a disaster. I erased such module but I dont think things are 100% right. Let me know, any help will be truly appreciated! Thanks in advance. 

Share this post


Link to post
Share on other sites

@NeoHub

With your FTP program (like Filezilla) go to

.../PrestaShop/MyeCommerce2/var/cache

Normally you will see the 2 following repertories:

.../PrestaShop/MyeCommerce2/var/cache/dev

.../PrestaShop/MyeCommerce2/var/cache/prod

Delete them both

Note: if you feel unsure, rename them (like dev_old and prod_old) first.

When it's done, say the magic formula... and if you forgot it, just refresh your browser with CTRL + F5 simultaneously.

Nalika

 

Share this post


Link to post
Share on other sites

Hi Nalika, many thanks, but actually now that I deleted all the dev directory and renamed prod_old (because I couldn't delete everything inside, many many files) I get this problem here 😱

Notice: tempnam(): file created in the system's temporary directory in /homepages/3/d639459114/htdocs/clickandbuilds/PrestaShop/MyeCommerce2/classes/PrestaShopAutoload.php on line 258

Warning: rename(/tmp/class_index.phpP2SXVH,/homepages/3/d639459114/htdocs/clickandbuilds/PrestaShop/MyeCommerce2/var/cache/dev/class_index.php): No such file or directory in /homepages/3/d639459114/htdocs/clickandbuilds/PrestaShop/MyeCommerce2/classes/PrestaShopAutoload.php on line 264

Notice: tempnam(): file created in the system's temporary directory in /homepages/3/d639459114/htdocs/clickandbuilds/PrestaShop/MyeCommerce2/classes/PrestaShopAutoload.php on line 258

Warning: rename(/tmp/class_stub.phpLhN6Lo,/homepages/3/d639459114/htdocs/clickandbuilds/PrestaShop/MyeCommerce2/var/cache/dev/class_stub.php): No such file or directory in /homepages/3/d639459114/htdocs/clickandbuilds/PrestaShop/MyeCommerce2/classes/PrestaShopAutoload.php on line 264

Notice: tempnam(): file created in the system's temporary directory in /homepages/3/d639459114/htdocs/clickandbuilds/PrestaShop/MyeCommerce2/classes/PrestaShopAutoload.php on line 258

Warning: rename(/tmp/namespaced_class_stub.phpedkhC5,/homepages/3/d639459114/htdocs/clickandbuilds/PrestaShop/MyeCommerce2/var/cache/dev/namespaced_class_stub.php): No such file or directory in /homepages/3/d639459114/htdocs/clickandbuilds/PrestaShop/MyeCommerce2/classes/PrestaShopAutoload.php on line 264

Warning: require_once(/homepages/3/d639459114/htdocs/clickandbuilds/PrestaShop/MyeCommerce2/var/cache/dev/appParameters.php): failed to open stream: No such file or directory in /homepages/3/d639459114/htdocs/clickandbuilds/PrestaShop/MyeCommerce2/config/bootstrap.php on line 87

Fatal error: require_once(): Failed opening required '/homepages/3/d639459114/htdocs/clickandbuilds/PrestaShop/MyeCommerce2/var/cache/dev/appParameters.php' (include_path='/homepages/3/d639459114/htdocs/clickandbuilds/PrestaShop/MyeCommerce2/vendor/pear/pear_exception:/homepages/3/d639459114/htdocs/clickandbuilds/PrestaShop/MyeCommerce2/vendor/pear/console_getopt:/homepages/3/d639459114/htdocs/clickandbuilds/PrestaShop/MyeCommerce2/vendor/pear/pear-core-minimal/src:/homepages/3/d639459114/htdocs/clickandbuilds/PrestaShop/MyeCommerce2/vendor/pear/archive_tar:.:/usr/lib/php7.2') in /homepages/3/d639459114/htdocs/clickandbuilds/PrestaShop/MyeCommerce2/config/bootstrap.php on line 87

 

Any tip??

Thanks a lot

Share this post


Link to post
Share on other sites

Fews  things to try:

  1. in /PrestaShop/MyeCommerce2/var/cache/prod, delete or rename class_index.php
  2. in /PrestaShop/MyeCommerce2/var/cache/dev, delete or rename class_index.php

Next go to your PS back-office, go to advanced parameters -> Performance and

  1. check if "debug mode" in on OFF position
  2. hit the button "clean the cache" (upper top of the page)

When it's done, refresh your browser with CTRL + F5 simultaneously... or open your site with a "private session" (AKA Incognito)

Nalika

Share this post


Link to post
Share on other sites

Hi Nalika, thanks for the response. Now I get this 😭:

Notice: tempnam(): file created in the system's temporary directory in /homepages/3/d639459114/htdocs/clickandbuilds/PrestaShop/MyeCommerce2/classes/PrestaShopAutoload.php on line 258

Warning: rename(/homepages/3/d639459114/htdocs/clickandbuilds/PrestaShop/MyeCommerce2/var/cache/dev/class_index.php): failed to open stream: Disk quota exceeded in /homepages/3/d639459114/htdocs/clickandbuilds/PrestaShop/MyeCommerce2/classes/PrestaShopAutoload.php on line 264

Warning: rename(/tmp/class_index.phpmameYI,/homepages/3/d639459114/htdocs/clickandbuilds/PrestaShop/MyeCommerce2/var/cache/dev/class_index.php): Disk quota exceeded in /homepages/3/d639459114/htdocs/clickandbuilds/PrestaShop/MyeCommerce2/classes/PrestaShopAutoload.php on line 264

Notice: tempnam(): file created in the system's temporary directory in /homepages/3/d639459114/htdocs/clickandbuilds/PrestaShop/MyeCommerce2/classes/PrestaShopAutoload.php on line 258

Notice: tempnam(): file created in the system's temporary directory in /homepages/3/d639459114/htdocs/clickandbuilds/PrestaShop/MyeCommerce2/classes/PrestaShopAutoload.php on line 258

Fatal error: Uncaught Symfony\Component\Filesystem\Exception\IOException: Cannot rename "/tmp/catalogue.it-IT.NXhscRe.php0GFjP2" to "/homepages/3/d639459114/htdocs/clickandbuilds/PrestaShop/MyeCommerce2/var/cache/dev/translations/catalogue.it-IT.NXhscRe.php". in /homepages/3/d639459114/htdocs/clickandbuilds/PrestaShop/MyeCommerce2/vendor/symfony/symfony/src/Symfony/Component/Filesystem/Filesystem.php:289 Stack trace: #0 /homepages/3/d639459114/htdocs/clickandbuilds/PrestaShop/MyeCommerce2/vendor/symfony/symfony/src/Symfony/Component/Filesystem/Filesystem.php(694): Symfony\Component\Filesystem\Filesystem->rename('/tmp/catalogue....', '/homepages/3/d6...', true) #1 /homepages/3/d639459114/htdocs/clickandbuilds/PrestaShop/MyeCommerce2/vendor/symfony/symfony/src/Symfony/Component/Config/ResourceCheckerConfigCache.php(124): Symfony\Component\Filesystem\Filesystem->dumpFile('/homepages/3/d6...', '<?php\n\nuse Symf...') #2 /homepages/3/d639459114/htdocs/clickandbuilds/PrestaShop/MyeCommerce2/vendor/symfony/symfony/src/Symfony/Co in /homepages/3/d639459114/htdocs/clickandbuilds/PrestaShop/MyeCommerce2/vendor/symfony/symfony/src/Symfony/Component/Filesystem/Filesystem.php on line 289

Share this post


Link to post
Share on other sites

Your troubles comes from a cache problem, so to fix it, you must launch PS WITHOUT cache enabled:

  • Go to advanced parameters -> Performance and change the following options:
  1. Compilation des templates -> Force compilation
  2. Cache -> No
  3. Multi servers syncronisation -> No
  • With your FTP program (like Filezilla) go to
.../PrestaShop/MyeCommerce2/var/cache

Normally you will see the 2 following repertories:

.../PrestaShop/MyeCommerce2/var/cache/dev
.../PrestaShop/MyeCommerce2/var/cache/prod

Delete or rename them both

  • When it's done, refresh your browser with CTRL + F5 simultaneously... or open your site with a "private session" (AKA Incognito)

    Nalika

Note: the 1st warning say:

Warning: rename(/homepages/3/d639459114/htdocs/clickandbuilds/PrestaShop/MyeCommerce2/var/cache/dev/class_index.php): failed to open stream

... so apparently the "debug mode" is activated, and it must be turned on OFF

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More