Jump to content

Error update 8 to 9. An exception has been thrown during the rendering of a template


Recommended Posts

Hello. 

I have updated Prestashop from 8 to 9, everything is working fine, the site looks good, but when you access the administrator (backend) it shows an error.

An exception has been thrown during the rendering of a template ("PrestaShop\PrestaShop\Core\Context\CurrencyContext::__construct(): Argument #9 ($precision) must be of type int, string given, called in /public_html/src/Core/Context/CurrencyContextBuilder.php on line 62").

TypeError 

PrestaShop\PrestaShop\Core\Context\CurrencyContext::__construct(): Argument #9 ($precision) must be of type int, string given, called in /public_html/src/Core/Context/CurrencyContextBuilder.php on line 62  

Anyone who can guide me to find the solution? 

Thank you

PHP: 8.1 to 8.4
PS: 9.0.1

Sin título.jpg

Sin título2.jpg

Link to comment
Share on other sites

  • 4 weeks later...

Same for me, except that nothing is working anymore (neither FO nor BO) and I don't have CL access to my hosting environment (OVH), so my shop is down and I don't know what to do to revert to a backup.

I'd be grateful for any help!

PS 1.8.2 => 9.0.0

PHP 8.1

Link to comment
Share on other sites

  • 1 month later...

I got the same error. The weirdest part about this error is that it didn't show up in a local and an ubuntu vps installation but it does break on my managed hosting environment. There is a discussion here https://github.com/PrestaShop/PrestaShop/issues/38894 but the hosting environment is never mentioned.

edit:
The environment was mentioned here after all https://github.com/PrestaShop/PrestaShop/pull/38905

tl;dr make the following changes

https://github.com/PrestaShop/PrestaShop/pull/38905/files

and the backoffice will probably be fixed.

Edited by wigs (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...