Jump to content

Update 8 to 9 error. An exception has been thrown during the rendering of a template


Recommended Posts

Hola.

He actualizado PrestaShop de la versión 8 a la 9. Todo funciona correctamente, el sitio web se ve bien, pero al acceder al administrador (backend) aparece un error.

Se ha generado una excepción durante la renderización de una plantilla ("PrestaShop\PrestaShop\Core\Context\CurrencyContext::__construct(): El argumento n.° 9 ($precision) debe ser de tipo int, se proporciona una cadena, se llama en /public_html/src/Core/Context/CurrencyContextBuilder.php en la línea 62").

TypeError

PrestaShop\PrestaShop\Core\Context\CurrencyContext::__construct(): El argumento n.° 9 ($precision) debe ser de tipo int, se proporciona una cadena, se llama en /public_html/src/Core/Context/CurrencyContextBuilder.php en la línea 62

¿Alguien puede ayudarme a encontrar la solución? 

Gracias

Sin título.jpg

Sin título2.jpg

Edited by gigiscol
Foro en español y estaba en inglés. (see edit history)
Link to comment
Share on other sites

I have same error. I use original file download from Prestashop website. Prestashop version 9 very slow and can't install. I spent 2 days but still not install Prestashop 9.0.0 from anywhere (localhost, hosting)

Link to comment
Share on other sites

An exception has been thrown during the rendering of a template" error when updating from version 8 to 9 sounds like a real headache! 😕

It’s like the system’s throwing a tantrum mid-upgrade. This kind of error often pops up when a template file or configuration isn’t playing nice with the new version—could be a syntax issue, a missing dependency, or something in the template engine choking on the update.

Link to comment
Share on other sites

Hola,

Parece ser un problema conocido.

¿Puedes revisar esta solicitud de extracción en GitHub y agregar manualmente los cambios al archivo src/Core/Context/CurrencyContextBuilder.php?

---

Hello,

This seems to be a known issue.

Can you have a look at this pull request on GitHub and manually add the changes to the src/Core/Context/CurrencyContextBuilder.php file?

Please note that this is the Spanish section of the forum.

  • Like 1
  • Thanks 2
Link to comment
Share on other sites

6 hours ago, Andrei H said:

Hola,

Parece ser un problema conocido.

¿Puedes revisar esta solicitud de extracción en GitHub y agregar manualmente los cambios al archivo src/Core/Context/CurrencyContextBuilder.php?

---

Hello,

This seems to be a known issue.

Can you have a look at this pull request on GitHub and manually add the changes to the src/Core/Context/CurrencyContextBuilder.php file?

Please note that this is the Spanish section of the forum.

Excellent, thank you so much.
It worked well.
I'd add this change:
CountryContextBuilder.php
Line 61. callPrefix: $legacyCountry->call_prefix,

to 

Line 61. callPrefix: (int) $legacyCountry->call_prefix,

  • Like 1
Link to comment
Share on other sites

Hi,

thank you. I was able to solve this error via GitHub solution but seems that I have other errors by 3rd party modules and its too early for me to upgrade to 9.

Hola, gracias. Pude solucionar este error con la solución de GithHub, pero parece que tengo otros errores de módulos de terceros y es demasiado pronto para actualizar a la versión 9.

  • Like 1
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...