Jump to content

Illegal length modifier specified 'f' in s[np]printf call in smarty_template_compiled.php line 178


Recommended Posts

Our site turned plain white and in debug mode we see en error message

Illegal length modifier specified 'f' in s[np]printf call in smarty_template_compiled.php line 178

we have tried to clear cache but nothing seems to work

Am looking for assistance urgently.

thank you in advance

Link to comment
Share on other sites

  • 2 weeks later...
  • 5 weeks later...
49 minutes ago, Guest said:

Prestashop version: 1.7.6.5

PHP version: 7.2

max_execution_time: 90

Folders permission 755 (yes)

Files permission 644 (yes)

Server cache enabled or disabled: enabled

Hi, thanks for your replay, here are my setup. Do you have any idea about whats going on?

Link to comment
Share on other sites

Hi Everyone,

our issue was settled by our hosting service.  Our site had randomly loaded on certain browsers and sometimes even after a few refreshes.

We had written in to our hosting service and they eventually solved it.  Below is a copy of their reply.

"When the problem is happening, the cause should show clearly in cPanel | Metrics | Visitors. It shows website activity in realtime. 
I have checked there, and I believe the problem was due to bad search engine bots accessing the website. I have blocked them. The block code is in the .htaccess file. These bots are blocked:
SemrushBot, AhrefsBot, MJ12bot, YandexBot, PetalBot, BLEXBot, DotBot
Also, I think some component of the PrestaShop site is old. I was only able to make the site work using PHP 5.6."

Now our site is working well but we will need to figure out what went wrong so that we won't have the same issue again.

Thanks

Link to comment
Share on other sites

3 minutes ago, lanie05 said:

Hi Everyone,

our issue was settled by our hosting service.  Our site had randomly loaded on certain browsers and sometimes even after a few refreshes.

We had written in to our hosting service and they eventually solved it.  Below is a copy of their reply.

"When the problem is happening, the cause should show clearly in cPanel | Metrics | Visitors. It shows website activity in realtime. 
I have checked there, and I believe the problem was due to bad search engine bots accessing the website. I have blocked them. The block code is in the .htaccess file. These bots are blocked:
SemrushBot, AhrefsBot, MJ12bot, YandexBot, PetalBot, BLEXBot, DotBot
Also, I think some component of the PrestaShop site is old. I was only able to make the site work using PHP 5.6."

Now our site is working well but we will need to figure out what went wrong so that we won't have the same issue again.

Thanks

Hello, thanks for your reply, please could you tell me your prestashop version? thanks!

Link to comment
Share on other sites

  • 4 weeks 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

On 10/14/2020 at 7:44 AM, lanie05 said:

Hi Everyone,

our issue was settled by our hosting service.  Our site had randomly loaded on certain browsers and sometimes even after a few refreshes.

We had written in to our hosting service and they eventually solved it.  Below is a copy of their reply.

"When the problem is happening, the cause should show clearly in cPanel | Metrics | Visitors. It shows website activity in realtime. 
I have checked there, and I believe the problem was due to bad search engine bots accessing the website. I have blocked them. The block code is in the .htaccess file. These bots are blocked:
SemrushBot, AhrefsBot, MJ12bot, YandexBot, PetalBot, BLEXBot, DotBot
Also, I think some component of the PrestaShop site is old. I was only able to make the site work using PHP 5.6."

Now our site is working well but we will need to figure out what went wrong so that we won't have the same issue again.

Thanks

The error is caused by outdated Prestashop modules or third-party modules.
Module codes may not be useful for higher versions of PHP.

Link to comment
Share on other sites

On 11/9/2020 at 8:54 PM, Guest said:

The error is caused by outdated Prestashop modules or third-party modules.
Module codes may not be useful for higher versions of PHP.

That would not work, doing a fresh install and then installing the 3rd party module (which is needed in my stores) will give me the same error.

Plus as an ecommerce website I need history of all transactions, sales and accounts. Plus not to mention re entering hundreds of products back to the website.

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...