Jump to content

After upgrade to 1.7.7 from 1.6.24 fatal error: Uncaught PrestaShop\PrestaShop\Core\Localization\Exception\LocalizationException: Unknown locale code: pl-PL


dolec

Recommended Posts

After upgrade i have error in front

Fatal error: Uncaught PrestaShop\PrestaShop\Core\Localization\Exception\LocalizationException: Unknown locale code: pl-PL

 and in backend

 

PrestaShop\PrestaShop\Core\Localization\Exception\ LocalizationException


in src/Core/Localization/Currency.php (line 185)

     * @throws LocalizationException

     */

    public function getSymbol($localeCode)

    {

        if (!isset($this->symbols[$localeCode])) {

            throw new LocalizationException('Unknown locale code: ' . $localeCode);

        }

        return $this->symbols[$localeCode];

    }


Currency->getSymbol('pl-PL')

How can i solve it manually?

Edited by dolec (see edit history)
Link to comment
Share on other sites

  • 3 weeks later...

Hi, same problem here!!

 

Oops... looks like an unexpected error occurred

Unknown locale code: it-IT

[PrestaShop\PrestaShop\Core\Localization\Exception\LocalizationException 0]

 

I can't access the back office, when i try prestashop give me this error..

How can you solve this without accessing BO?

 

PS.: i have already tryed to reinstall and apply the right language pack, this won't solve the problem.

 

Thanks

Link to comment
Share on other sites

  • 2 weeks later...

This error happens when the currency is in the ps_currency table but not in the ps_currency_lang table - at least not for the specified language.

The ps_currency_lang table was added in Prestashop version 1.7.6.0. Problems with it are typically the result of problems while upgrading from an older version. 

Adding entries into the database for each active language for each active currency is usually quite easy to do.

In Prestools the Shop Rescue page contains a function to do this automatically.

Edited by musicmaster (see edit history)
Link to comment
Share on other sites

  • 2 weeks later...
  • 2 months later...
On 1/29/2021 at 6:01 PM, musicmaster said:

This error happens when the currency is in the ps_currency table but not in the ps_currency_lang table - at least not for the specified language.

The ps_currency_lang table was added in Prestashop version 1.7.6.0. Problems with it are typically the result of problems while upgrading from an older version. 

I'm trying to upgrade to latest version (1.7.7.3) from a version previous to 1.7.6.0 and I'm getting this error during the upgrade… I've tried to create the table ps_currency_lang (copied from a clean install) and I'm still getting the error. I don't know what else can I try… do you have an idea on what would be the best way to avoid this issue during an upgrade?

Link to comment
Share on other sites

9 hours ago, Coluccini said:

I'm trying to upgrade to latest version (1.7.7.3) from a version previous to 1.7.6.0 and I'm getting this error during the upgrade… I've tried to create the table ps_currency_lang (copied from a clean install) and I'm still getting the error. I don't know what else can I try… do you have an idea on what would be the best way to avoid this issue during an upgrade?

Copying the table is not enough. It must have an entry for every currency in every language.

Link to comment
Share on other sites

  • 3 months later...
3 minutes ago, musicmaster said:

I said that some rows were missing.

Sherlock Holmes would have concluded that he should add them. Just a few rows with a few fields.

You assume everyone has the same technical ability as you. Not everyone is willing to touch a database without clear cut instructions. When it comes to technical issues being vague isn't helpful. You were unable to help Coluccini and your replies aren't helping me.

If you have a solution you should consider writing "This is the solution" with a guide, then people would be thankful to you.

FIX FOR PEOPLE THAT HAVE THE SAME ISSUE

I was able to fix this issue by rerunning the script http://<shop_domain>/install/upgrade/upgrade.php after manually copying the files across.

  • Thanks 1
Link to comment
Share on other sites

Hi guys,

On 1/29/2021 at 6:01 PM, musicmaster said:

This error happens when the currency is in the ps_currency table but not in the ps_currency_lang table - at least not for the specified language.

The ps_currency_lang table was added in Prestashop version 1.7.6.0. Problems with it are typically the result of problems while upgrading from an older version. 

I solve my problem thanks to the message above:

go to the ps_lang table and note all the ID of the languages installed in your shop

then go to the ps_currency_lang table - and check which id are missing - you can add them by simply copying the line and changing the ID...

Hope it helps

Link to comment
Share on other sites

  • 3 months later...
On 7/28/2021 at 5:31 AM, juju33el said:

Hi guys,

I solve my problem thanks to the message above:

go to the ps_lang table and note all the ID of the languages installed in your shop

then go to the ps_currency_lang table - and check which id are missing - you can add them by simply copying the line and changing the ID...

Hope it helps

Thank you.

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