Jump to content

Website down after migration "Attempted to call an undefined method named "getPattern" of class "Currency"


rtruso

Recommended Posts

Hello,

I launched 1click-upgrade to update Prestashop to last version but it failed and now the website is down. I have searched to find a solution and generally I don't ask for help but this time I need it. If someone can find out how solve it it would be great.

My configuration: Prestashop 1.7 / Debian 9 / PHP 7.2 (tested also with 7.1 and 7.3).

The main error is :

Attempted to call an undefined method named "getPattern" of class "Currency".

Detail of profiler exception :

------------------------------------

Symfony\Component\Debug\Exception\ UndefinedMethodException

 

in src/Core/Localization/Currency/DataLayer/CurrencyDatabase.php (line 120)

        $currencyData->setPrecision($currencyEntity->precision);

        $currencyData->setNames([$localeCode => $currencyEntity->name]);

        $currencyData->setSymbols([$localeCode => $currencyEntity->symbol]);

        $idLang = Language::getIdByLocale($localeCode, true);

        $currencyPattern = $currencyEntity->getPattern($idLang);

        if (!empty($currencyPattern)) {

            $currencyData->setPatterns([$localeCode => $currencyEntity->getPattern($idLang)]);

        }

        return $currencyData;

 

CurrencyDatabase->doRead(object(LocalizedCurrencyId)) in src/Core/Data/Layer/AbstractDataLayer.php (line 90)

 

AbstractDataLayer->read(object(LocalizedCurrencyId)) in src/Core/Data/Layer/AbstractDataLayer.php (line 150)

 

AbstractDataLayer->propagateRead(object(LocalizedCurrencyId)) in src/Core/Data/Layer/AbstractDataLayer.php (line 94)

 

AbstractDataLayer->read(object(LocalizedCurrencyId)) in src/Core/Localization/Currency/CurrencyDataSource.php (line 67)

 

CurrencyDataSource->getLocalizedCurrencyData(object(LocalizedCurrencyId)) in src/Core/Localization/Currency/CurrencyDataSource.php (line 110)

 

CurrencyDataSource->formatCurrenciesData(array('AED', 'AMD', 'AOA', 'ARS', 'AUD', 'AWG', 'AZN', 'BBD', 'BDT', 'BHD', 'BMD', 'BND', 'BRL', 'BSD', 'BYR', 'BZD', 'CAD', 'CHF', 'CNY', 'COP', 'CRC', 'DKK', 'DZD', 'EGP', 'EUR', 'GBP', 'HKD', 'HUF', 'IDR', 'ILS', 'INR', 'JPY', 'KRW', 'LKR', 'MAD', 'MMK', 'MNT', 'MXN', 'NGN', 'NOK', 'NZD', 'PLN', 'QAR', 'RUB', 'SEK', 'SGD', 'THB', 'TND', 'TRY', 'TWD', 'UAH', 'USD', 'VEF', 'XCD', 'XOF', 'ZAR'), 'fr-FR') in src/Core/Localization/Currency/CurrencyDataSource.php (line 97)

 

CurrencyDataSource->getAllInstalledCurrenciesData('fr-FR') in src/Core/Localization/Currency/Repository.php (line 87)

 

Repository->getAllInstalledCurrencies('fr-FR') in src/Core/Localization/Locale/Repository.php (line 207)

 

Repository->getPriceSpecifications('fr-FR') in src/Core/Localization/Locale/Repository.php (line 150)

 

Repository->getLocale('fr-FR') in classes/controller/Controller.php (line 189)

 

ControllerCore->init() in classes/controller/AdminController.php (line 2782)

 

AdminControllerCore->init() in classes/controller/Controller.php (line 273)

 

ControllerCore->run() in classes/Dispatcher.php (line 515)

 

DispatcherCore->dispatch() in adminlws/index.php (line 97)

 

----------------------------

Front end error:

Warning: Use of undefined constant _PS_ENV_ - assumed '_PS_ENV_' (this will throw an Error in a future version of PHP) in /var/www/html/src/Adapter/Environment.php on line 64

Fatal error: Uncaught Error: Call to undefined method Currency::getPattern() in /var/www/html/src/Core/Localization/Currency/DataLayer/CurrencyDatabase.php:120 Stack trace: #0 /var/www/html/src/Core/Data/Layer/AbstractDataLayer.php(90): PrestaShop\PrestaShop\Core\Localization\Currency\DataLayer\CurrencyDatabase->doRead(Object(PrestaShop\PrestaShop\Core\Localization\Currency\LocalizedCurrencyId)) #1 /var/www/html/src/Core/Data/Layer/AbstractDataLayer.php(150): PrestaShop\PrestaShop\Core\Data\Layer\AbstractDataLayer->read(Object(PrestaShop\PrestaShop\Core\Localization\Currency\LocalizedCurrencyId)) #2 /var/www/html/src/Core/Data/Layer/AbstractDataLayer.php(94): PrestaShop\PrestaShop\Core\Data\Layer\AbstractDataLayer->propagateRead(Object(PrestaShop\PrestaShop\Core\Localization\Currency\LocalizedCurrencyId)) #3 /var/www/html/src/Core/Localization/Currency/CurrencyDataSource.php(67): PrestaShop\PrestaShop\Core\Data\Layer\AbstractDataLayer->read(Object(PrestaShop\PrestaShop\Core\Localization\Currency\LocalizedCurrencyId)) #4 / in /var/www/html/src/Core/Localization/Currency/DataLayer/CurrencyDatabase.php on line 120

----------------------------------------------------

Profiler log:

LevelChannelMessage

DEBUG 16:56:50doctrineSELECT name FROM ps_module WHERE active = 1

WARNING 16:56:50translationTranslation not found.

WARNING 16:56:50translationTranslation not found.

WARNING 16:56:50translationTranslation not found.

WARNING 16:56:50translationTranslation not found.

WARNING 16:56:50translationTranslation not found.

WARNING 16:56:50translationTranslation not found.

WARNING 16:56:50translationTranslation not found.

WARNING 16:56:50translationTranslation not found.

WARNING 16:56:50translationTranslation not found.

CRITICAL 16:56:50phpCall to undefined method Currency::getPattern()

CRITICAL 16:56:50requestUncaught PHP Exception Symfony\Component\Debug\Exception\UndefinedMethodException: "Attempted to call an undefined method named "getPattern" of class "Currency"." at /var/www/html/src/Core/Localization/Currency/DataLayer/CurrencyDatabase.php line 120

-----------------------------------------------------------------

 

 

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