Jump to content

Prestashop 1.7.6.4 error loading page


gabiferbe

Recommended Posts

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

  • 3 months later...

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

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

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

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 65

on 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 78

Any ideas or assistance would be greatly appreciated.

Thank you.

Link to comment
Share on other sites

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 by SMTmardan (see edit history)
Link to comment
Share on other sites

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 by Matthew R (see edit history)
Link to comment
Share on other sites

  • 1 month later...

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 by Elfenbein (see edit history)
Link to comment
Share on other sites

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

  • 1 month later...

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 by Mr.G
Updated fix (see edit history)
Link to comment
Share on other sites

  • 10 months later...
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 by SMTmardan (see edit history)
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...