Jump to content

Update Prestashop 1.7.7.0 second language doesn't work anymore


Recommended Posts

Hi all, maybe somebody can help me.

I have updated from 1.76.9 to 1.7.7.0 All went well and the update didn't gave any problems. After that I opened the site and I cannot see the second language anymore.

What can it be?

This is what I get with the debug on:

Fatal error: Uncaught PrestaShop\PrestaShop\Core\Localization\Exception\LocalizationException: Unknown locale code: fr-FR in /var/www/mixje.com/public_html/src/Core/Localization/Currency.php:185 Stack trace: #0 /var/www/mixje.com/public_html/src/Core/Localization/Specification/Factory.php(121): PrestaShop\PrestaShop\Core\Localization\Currency->getSymbol('fr-FR') #1 /var/www/mixje.com/public_html/src/Core/Localization/Locale/Repository.php(218): PrestaShop\PrestaShop\Core\Localization\Specification\Factory->buildPriceSpecification('fr-FR', Object(PrestaShop\PrestaShop\Core\Localization\CLDR\Locale), Object(PrestaShop\PrestaShop\Core\Localization\Currency), true, 'symbol', 6) #2 /var/www/mixje.com/public_html/src/Core/Localization/Locale/Repository.php(150): PrestaShop\PrestaShop\Core\Localization\Locale\Repository->getPriceSpecifications('fr-FR') #3 /var/www/mixje.com/public_html/classes/controller/Controller.php(196): PrestaShop\PrestaShop\Core\Localization\Locale\Repository->getLocale('fr-FR') #4 /var/www/mixje.com/publi in /var/www/mixje.com/public_html/src/Core/Localization/Currency.php on line 185

I had to put the website back to version 1.7.6.9 but I want to go on to 1.7.7.0

Can some of you explain me what is going wrong?

Thank you for your help...

Have a nice weekend,

 

Link to comment
Share on other sites

  • 2 months later...

Thank you for your answer this is my table " ps_currency_lang "

 

I have these warning:
Warning: simplexml_load_file(): I/O warning : failed to load external entity "" in /home/vrqlcrq/www/src/Core/Localization/CLDR/Reader.php on line 152

Warning: simplexml_load_file(): I/O warning : failed to load external entity "" in /home/vrqlcrq/www/src/Core/Localization/CLDR/Reader.php on line 162

Notice: Trying to get property 'parentLocales' of non-object in /home/vrqlcrq/www/src/Core/Localization/CLDR/Reader.php on line 212

Notice: Trying to get property 'parentLocale' of non-object in /home/vrqlcrq/www/src/Core/Localization/CLDR/Reader.php on line 212

Warning: Invalid argument supplied for foreach() in /home/vrqlcrq/www/src/Core/Localization/CLDR/Reader.php on line 212

Notice: Trying to get property 'parentLocales' of non-object in /home/vrqlcrq/www/src/Core/Localization/CLDR/Reader.php on line 212

Notice: Trying to get property 'parentLocale' of non-object in /home/vrqlcrq/www/src/Core/Localization/CLDR/Reader.php on line 212

Warning: Invalid argument supplied for foreach() in /home/vrqlcrq/www/src/Core/Localization/CLDR/Reader.php on line 212



image.thumb.png.53bba3e76e9c4b400ab0ebe67a59bf26.png

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

thank you for your answer
Since the dashboard doesn't work i installed the pack for France in local version and i repeated the migration process ( and i deleted the var/cache content folder ) but the problem remains  with these warning 
line 152 is in this function :  

protected function initSupplementalData()
    {
        // Supplemental data about currencies, languages and parent locales
        if (!isset($this->supplementalXml)) {
            $supplementalPath = realpath(
                _PS_ROOT_DIR_ . '/'
                . self::CLDR_SUPPLEMENTAL
                . 'supplementalData.xml'
            );

  • 152            $this->supplementalXml = simplexml_load_file($supplementalPath);

        }
  if (!isset($this->numberingSystemsXml)) {
            $numberingSystemsPath = realpath(
                _PS_ROOT_DIR_ . '/'
                . self::CLDR_SUPPLEMENTAL
                . 'numberingSystems.xml'
            );

  •      162         $this->numberingSystemsXml = simplexml_load_file($numberingSystemsPath);

        }

    protected function getParentLocale($localeCode)
    {
        // root is the... root of all CLDR locales' data. Then no parent.
        if (self::CLDR_ROOT_LOCALE == $localeCode) {
            return null;
        }

        // The special case from supplemental data

  •      212   foreach ($this->supplementalXml->parentLocales->parentLocale as $data) {

            $locales = explode(' ', $data['locales']);
            if (in_array($localeCode, $locales)) {
                return $data['parent'];
            }
        }

        // The common case with truncation
        $pos = strrpos($localeCode, '_');
        if (false !== $pos) {
            $parent = substr($localeCode, 0, $pos);
            if (false === $parent) {
                throw new LocalizationException(
                    sprintf('Invalid locale code: "%s"', $localeCode)
                );
            }

            return $parent;
        }

        // The "top level" case. When only language code is left in $localeCode: 'en', 'fr'... then parent is "root".
        return self::CLDR_ROOT_LOCALE;
    }
 


image.thumb.png.32ae3d042dd6e6c6a67c71ad07742634.png

Thank you in advance 

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

  • 2 months later...
10 minutes ago, Futamiya said:

Just a question : did u said that they have localization files in main ?

/localization/CLDR/core/common/main/localization ??

I don't understand your question.

Localization as Prestashop uses it is just another word for country-language

1gag1.jpg.de416a3b1617d059887456a9236c5f54.jpg

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