Jump to content

[solved]Fatal Error


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.

Link to comment
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.

Link to comment
Share on other sites

  • 3 months later...
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?

Link to comment
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. 

Link to comment
Share on other sites

  • 11 months later...
  • 4 weeks later...

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
Link to comment
Share on other sites

  • 3 months later...

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

Link to comment
Share on other sites

  • 7 months later...

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. 

Link to comment
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

 

Link to comment
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

Link to comment
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

Link to comment
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

Link to comment
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

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...