Tejo1 Posted December 12, 2020 Share Posted December 12, 2020 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 More sharing options...
innocenceesstt Posted March 1, 2021 Share Posted March 1, 2021 didyou find any solution i have a similar problem Link to comment Share on other sites More sharing options...
musicmaster Posted March 2, 2021 Share Posted March 2, 2021 Make sure that the ps_currency_lang table contains entries for each currency in each language. Link to comment Share on other sites More sharing options...
innocenceesstt Posted March 2, 2021 Share Posted March 2, 2021 (edited) 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 Edited March 2, 2021 by innocenceesstt (see edit history) Link to comment Share on other sites More sharing options...
musicmaster Posted March 3, 2021 Share Posted March 3, 2021 That was not what I meant. Your should start up Phpmyadmin and have a direct look at the database table. Also take inventory. Which currencies do you have (in ps_currency) and which languages (in ps_lang)? Link to comment Share on other sites More sharing options...
innocenceesstt Posted March 3, 2021 Share Posted March 3, 2021 thank you for your help yes i verified but the problem remains .. Link to comment Share on other sites More sharing options...
musicmaster Posted March 4, 2021 Share Posted March 4, 2021 12 hours ago, innocenceesstt said: thank you for your help yes i verified but the problem remains .. Try importing the localization pack for France. Link to comment Share on other sites More sharing options...
innocenceesstt Posted March 4, 2021 Share Posted March 4, 2021 (edited) 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; } Thank you in advance Edited March 4, 2021 by innocenceesstt (see edit history) Link to comment Share on other sites More sharing options...
musicmaster Posted March 5, 2021 Share Posted March 5, 2021 It might be that those xml files are not good. So try copying them from a fresh PS installation. Link to comment Share on other sites More sharing options...
innocenceesstt Posted March 8, 2021 Share Posted March 8, 2021 thank you for answer, the problem is resolved Link to comment Share on other sites More sharing options...
musicmaster Posted May 20, 2021 Share Posted May 20, 2021 2 hours ago, Futamiya said: "So try copying them from a new PS installation." => What do you mean here Hello Futamiya. I find it hard to explain the copying of files. What is unclear? Link to comment Share on other sites More sharing options...
musicmaster Posted May 21, 2021 Share Posted May 21, 2021 This is not about copying those PHP files. It is about copying XML files. /localization/CLDR/core/common/main /localization Link to comment Share on other sites More sharing options...
Futamiya Posted May 21, 2021 Share Posted May 21, 2021 Oooooh! Ty I will make this changement. I will tell u how that work Thank youuuu Sincerelly Futamiya Link to comment Share on other sites More sharing options...
Futamiya Posted May 21, 2021 Share Posted May 21, 2021 Just a question : did u said that they have localization files in main ? /localization/CLDR/core/common/main/localization ?? Link to comment Share on other sites More sharing options...
musicmaster Posted May 21, 2021 Share Posted May 21, 2021 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 Link to comment Share on other sites More sharing options...
musicmaster Posted May 21, 2021 Share Posted May 21, 2021 Why so stingy? Copy the whole directory Link to comment Share on other sites More sharing options...
Futamiya Posted May 21, 2021 Share Posted May 21, 2021 ok ok ^^ thanks Link to comment Share on other sites More sharing options...
Futamiya Posted May 21, 2021 Share Posted May 21, 2021 I copy all .. Same error Link to comment Share on other sites More sharing options...
Futamiya Posted May 21, 2021 Share Posted May 21, 2021 This is so weird... Link to comment Share on other sites More sharing options...
musicmaster Posted May 21, 2021 Share Posted May 21, 2021 Is your shop an upgrade? Link to comment Share on other sites More sharing options...
Futamiya Posted May 21, 2021 Share Posted May 21, 2021 Yes, just last day. Link to comment Share on other sites More sharing options...
musicmaster Posted May 21, 2021 Share Posted May 21, 2021 I noticed that your error message contains the name of a module: everpsquotatio. Try disabling that. Link to comment Share on other sites More sharing options...
Futamiya Posted May 25, 2021 Share Posted May 25, 2021 (edited) Bonjour, Je suis de retour, désolé ^^ 'J'ai trouvé la solution. Merci beaucoup pour votre aide. 1 / Arrêtez le module de débogage sur Prestashop 2 / cliquez sur Effacer le cache mémoire Edited May 25, 2021 by Futamiya (see edit history) 1 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now