gabiferbe Posted May 11, 2020 Share Posted May 11, 2020 Hi i need help with my prestashop all of sudden it stopped working... the back office show me this error (1/1) FatalErrorException Error: Illegal length modifier specified 'f' in s[np]printf call in EntityManagerInterface.php line 33 and the front this one Fatal error: Illegal length modifier specified 'f' in s[np]printf call in /public_html/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/Builder/NodeParentInterface.php on line 19 i dont know what could have happened because i havent make any new changes.... thanks for your help Link to comment Share on other sites More sharing options...
Aloure Posted August 27, 2020 Share Posted August 27, 2020 Hello, we are having that same issue out of nowhere. The website was loading fine with no files modified and we looked at our website and saw this error loading: FatalErrorException Error: Illegal length modifier specified 'f' in s[np]printf call in Filesystem.php line 281 We are using 1.7.6.5 but we don't have that error in our BO, just the website itself. Link to comment Share on other sites More sharing options...
Mian Waqas Posted August 27, 2020 Share Posted August 27, 2020 hi, facing same issue since yesterday... did you managed to rectify it? Link to comment Share on other sites More sharing options...
JBW Posted August 28, 2020 Share Posted August 28, 2020 Whats your PHP version, was there any recent change? Link to comment Share on other sites More sharing options...
Elfenbein Posted August 30, 2020 Share Posted August 30, 2020 Hello, I have the same issue. Prestashop 1.7.6.2. PHP Version 7.2.32 Error: FatalErrorException Error: Illegal length modifier specified 'f' in s[np]printf call in smarty_internal_runtime_writefile.php line 78 Any idea? Thank you Link to comment Share on other sites More sharing options...
JBW Posted August 31, 2020 Share Posted August 31, 2020 It's a wierd error and there is less information about in on google. Seems somehow related to your PHP version/setup. Anyway try to reset cache by renaming /var/cache/ to /var/cache_old, hope it helps Link to comment Share on other sites More sharing options...
Elfenbein Posted August 31, 2020 Share Posted August 31, 2020 I tried to reset/rename the cache, but still not working. By the way this white blank front office just came without any modification on my website or on the server. The back office still working, and I tried to clear the cache there too without success. Any other idea? Thank you. Link to comment Share on other sites More sharing options...
Matthew R Posted August 31, 2020 Share Posted August 31, 2020 We are having similar issues and have not been able to find any solutions anywhere online. I have renamed /var and cleared the cache, but has not helped. 1.7.6.7 php 7.2 Backend functions, when accessing the module manager we receive this error. CRITICAL08:56:09phpFatal Error: Illegal length modifier specified 'f' in s[np]printf call CRITICAL08:56:09requestUncaught PHP Exception Symfony\Component\Debug\Exception\FatalErrorException: "Error: Illegal length modifier specified 'f' in s[np]printf call" at /home/da91ea5/public_html/vendor/twig/twig/src/Cache/FilesystemCache.php line 65on a refresh 500 error: in vendor/twig/twig/src/Cache/FilesystemCache.php (line 65) } elseif (!is_writable($dir)) { throw new \RuntimeException(sprintf('Unable to write in the cache directory (%s).', $dir)); } $tmpFile = tempnam($dir, basename($key)); if (false !== @file_put_contents($tmpFile, $content) && @rename($tmpFile, $key)) { @chmod($key, 0666 & ~umask()); if (self::FORCE_BYTECODE_INVALIDATION == ($this->options & self::FORCE_BYTECODE_INVALIDATION)) { // Compile cached file into bytecode cache if (\function_exists('opcache_invalidate')) {On the frontend cart: (1/1) FatalErrorException Error: Illegal length modifier specified 'f' in s[np]printf call in smarty_internal_runtime_writefile.php line 78Any ideas or assistance would be greatly appreciated. Thank you. Link to comment Share on other sites More sharing options...
Mian Waqas Posted September 1, 2020 Share Posted September 1, 2020 (edited) Hi, my PS was running fine on PHP 7.2 before, then suddenly this error occurred... but seems when i downgrade it to PHP 5.6 the issue get resolved. so my conclusion is there is recent module which is not supported by PHP 7.2 that is why error is occurring. any one facing the issue can downgrade or update the PHP version and it will fix the error. regards Edited September 1, 2020 by SMTmardan (see edit history) Link to comment Share on other sites More sharing options...
Matthew R Posted September 1, 2020 Share Posted September 1, 2020 (edited) Ok, I seem to have fixed it on mine. I dont know what in particular did it. I re-did all my php.ini settings to the recommended settings, and renamed my cache a second time to let it rebuild and over a few refreshes all the errors went away. Got it! max_execution_time I tried resetting the max_execution_time back to the server recommended 90 (to fix the Invalid token issue), and the errors started again. Reset to 300 and gone again. Edited September 2, 2020 by Matthew R (see edit history) Link to comment Share on other sites More sharing options...
Elfenbein Posted October 6, 2020 Share Posted October 6, 2020 (edited) Hello again, Any of the the solution above not help with my problem. But I found that If I clear or delete my var/cache folder on my server AND I clear my browser cookies for my webshop, then the site becomes visible again, until I refresh or just click one of my link. Do you have more ideas? Thank you Tamas Edited October 6, 2020 by Elfenbein (see edit history) Link to comment Share on other sites More sharing options...
Mian Waqas Posted October 7, 2020 Share Posted October 7, 2020 14 hours ago, Elfenbein said: Hello again, Any of the the solution above not help with my problem. But I found that If I clear or delete my var/cache folder on my server AND I clear my browser cookies for my webshop, then the site becomes visible again, until I refresh or just click one of my link. Do you have more ideas? Thank you Tamas Hi, There seems to be Cache enabled on your server/host. disable it and hopefully it will fix the issue. Link to comment Share on other sites More sharing options...
Mr.G Posted November 9, 2020 Share Posted November 9, 2020 (edited) My PS is 1.7.6.8 same error. Spent weeks trying to find an answer. Update your PHP to 7.4.x it fixed the problem on 3 of my stores. But the backend formatting gets messed up on product edit/add, customer edit and a few other pages. (CSS issue) Workaround, I put the store on Maintenance change the PHP to 7.3.x make my edits, put PHP to 7.4.x and then re-enable the store. Update your modules too. Hope it helps. Edited November 9, 2020 by Mr.G Updated fix (see edit history) Link to comment Share on other sites More sharing options...
karimaotmari Posted September 30, 2021 Share Posted September 30, 2021 hi guys, facing this same problem in 2021 prestashop 1.7.7.5 php 7.3 any ideas ?! Link to comment Share on other sites More sharing options...
Mian Waqas Posted October 5, 2021 Share Posted October 5, 2021 (edited) On 9/30/2021 at 6:06 PM, karimaotmari said: hi guys, facing this same problem in 2021 prestashop 1.7.7.5 php 7.3 any ideas ?! Hello, Please downgrade to PHP 7.2 & then test with PHP 7.0 if the earlier does not fix it. Dont forget to clear the cache after changing it. Please also check cache on your server side if its enable. Regards Regards Edited October 5, 2021 by SMTmardan (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now