Unknown column 'locale' in 'where clause'<br /><br /><pre>SELECT `id_lang` FROM `ft_lang`
WHERE `locale` = 'es-es'
OR `language_code` = 'es-es' LIMIT 1</pre>
at line 769 in file classes/db/Db.php
764. if ($webservice_call && $errno) {
765. $dbg = debug_backtrace();
766. WebserviceRequest::getInstance()->setError(500, '[SQL Error] ' . $this->getMsgError() . '. From ' . (isset($dbg[3]['class']) ? $dbg[3]['class'] : '') . '->' . $dbg[3]['function'] . '() Query was : ' . $sql, 97);
767. } elseif (_PS_DEBUG_SQL_ && $errno && !defined('PS_INSTALLATION_IN_PROGRESS')) {
768. if ($sql) {
769. throw new PrestaShopDatabaseException($this->getMsgError() . '<br /><br /><pre>' . $sql . '</pre>');
770. }
771.
772. throw new PrestaShopDatabaseException($this->getMsgError());
773. }
774. }
380. $this->result = $this->_query($sql);
381. }
382. }
383.
384. if (_PS_DEBUG_SQL_) {
385. $this->displayError($sql);
386. }
387.
388. return $this->result;
389. }
390.
Argument [0] SELECT `id_lang` FROM `ft_lang` WHERE `locale` = 'es-es' OR `language_code` = 'es-es' LIMIT 1
658.
659. return $result;
660. }
661. }
662.
663. $this->result = $this->query($sql);
664. if (!$this->result) {
665. $result = false;
666. } else {
667. $result = $this->nextRow($this->result);
668. }
Argument [0] SELECT `id_lang` FROM `ft_lang` WHERE `locale` = 'es-es' OR `language_code` = 'es-es' LIMIT 1
692. {
693. if ($sql instanceof DbQuery) {
694. $sql = $sql->build();
695. }
696.
697. if (!$result = $this->getRow($sql, $use_cache)) {
698. return false;
699. }
700.
701. return array_shift($result);
702. }
Argument [0] SELECT `id_lang` FROM `ft_lang` WHERE `locale` = 'es-es' OR `language_code` = 'es-es' LIMIT 1 Argument [1] 1
785. if ($noCache || !Cache::isStored($key)) {
786. $idLang = Db::getInstance()
787. ->getValue(
788. 'SELECT `id_lang` FROM `' . _DB_PREFIX_ . 'lang`
789. WHERE `locale` = \'' . pSQL(strtolower($locale)) . '\'
790. OR `language_code` = \'' . pSQL(strtolower($locale)) . '\''
791. );
792.
793. Cache::store($key, $idLang);
794.
795. return $idLang;
Argument [0] SELECT `id_lang` FROM `ft_lang` WHERE `locale` = 'es-es' OR `language_code` = 'es-es'
107. *
108. * @return Currency|null
109. */
110. public function getCurrencyByIsoCodeAndLocale($isoCode, $locale)
111. {
112. $idLang = Language::getIdByLocale($locale, true);
113.
114. return $this->getCurrencyByIsoCode($isoCode, $idLang);
115. }
116.
117. /**
Argument [0] es-es Argument [1] 1
101. throw new LocalizationException('First parameter must be an instance of ' . LocalizedCurrencyId::class);
102. }
103.
104. $localeCode = $currencyDataId->getLocaleCode();
105. $currencyCode = $currencyDataId->getCurrencyCode();
106. $currencyEntity = $this->dataProvider->getCurrencyByIsoCodeAndLocale($currencyCode, $localeCode);
107.
108. if (null === $currencyEntity) {
109. return null;
110. }
111.
Argument [0] EUR Argument [1] es-es
85. *
86. * @throws DataLayerException
87. */
88. public function read($id)
89. {
90. $data = $this->doRead($id);
91.
92. // If nothing found, ask lower layer
93. if (null === $data) {
94. $data = $this->propagateRead($id);
95.
Argument [0] PrestaShop\PrestaShop\Core\Localization\Currency\LocalizedCurrencyId Object ( [currencyCode:PrestaShop\PrestaShop\Core\Localization\Currency\LocalizedCurrencyId:private] => EUR [localeCode:PrestaShop\PrestaShop\Core\Localization\Currency\LocalizedCurrencyId:private] => es-es )
145. * @throws DataLayerException
146. */
147. protected function propagateRead($field)
148. {
149. if (isset($this->lowerDataLayer)) {
150. return $this->lowerDataLayer->read($field);
151. }
152.
153. return null;
154. }
155.
Argument [0] PrestaShop\PrestaShop\Core\Localization\Currency\LocalizedCurrencyId Object ( [currencyCode:PrestaShop\PrestaShop\Core\Localization\Currency\LocalizedCurrencyId:private] => EUR [localeCode:PrestaShop\PrestaShop\Core\Localization\Currency\LocalizedCurrencyId:private] => es-es )
89. {
90. $data = $this->doRead($id);
91.
92. // If nothing found, ask lower layer
93. if (null === $data) {
94. $data = $this->propagateRead($id);
95.
96. // If nothing was found deeper, there is nothing more to do
97. if (null === $data) {
98. return null;
99. }
Argument [0] PrestaShop\PrestaShop\Core\Localization\Currency\LocalizedCurrencyId Object ( [currencyCode:PrestaShop\PrestaShop\Core\Localization\Currency\LocalizedCurrencyId:private] => EUR [localeCode:PrestaShop\PrestaShop\Core\Localization\Currency\LocalizedCurrencyId:private] => es-es )
62. /**
63. * {@inheritdoc}
64. */
65. public function getLocalizedCurrencyData(LocalizedCurrencyId $localizedCurrencyId)
66. {
67. return $this->topLayer->read($localizedCurrencyId);
68. }
69.
70. /**
71. * Is this currency available ?
72. * (an available currency is not deleted AND is active).
Argument [0] PrestaShop\PrestaShop\Core\Localization\Currency\LocalizedCurrencyId Object ( [currencyCode:PrestaShop\PrestaShop\Core\Localization\Currency\LocalizedCurrencyId:private] => EUR [localeCode:PrestaShop\PrestaShop\Core\Localization\Currency\LocalizedCurrencyId:private] => es-es )
105. */
106. private function formatCurrenciesData(array $currencyCodes, $localeCode)
107. {
108. $currenciesData = [];
109. foreach ($currencyCodes as $currencyCode) {
110. $currenciesData[] = $this->getLocalizedCurrencyData(new LocalizedCurrencyId($currencyCode, $localeCode));
111. }
112.
113. return $currenciesData;
114. }
115. }
Argument [0] PrestaShop\PrestaShop\Core\Localization\Currency\LocalizedCurrencyId Object ( [currencyCode:PrestaShop\PrestaShop\Core\Localization\Currency\LocalizedCurrencyId:private] => EUR [localeCode:PrestaShop\PrestaShop\Core\Localization\Currency\LocalizedCurrencyId:private] => es-es )
92. /**
93. * {@inheritdoc}
94. */
95. public function getAllInstalledCurrenciesData($localeCode)
96. {
97. return $this->formatCurrenciesData($this->installedDataLayer->getAllInstalledCurrencyIsoCodes(), $localeCode);
98. }
99.
100. /**
101. * @param array $currencyCodes
102. * @param string $localeCode
Argument [0] Array ( [0] => EUR ) Argument [1] es-es
82. /**
83. * {@inheritdoc}
84. */
85. public function getAllInstalledCurrencies($localeCode)
86. {
87. return $this->createCurrenciesFromData($this->dataSource->getAllInstalledCurrenciesData($localeCode));
88. }
89.
90. /**
91. * @param array $currenciesData
92. *
Argument [0] es-es
202. $cldrLocale = $this->cldrLocaleRepository->getLocale($localeCode);
203. if (null === $cldrLocale) {
204. throw new LocalizationException('CLDR locale not found for locale code "' . $localeCode . '"');
205. }
206.
207. $currencies = $this->currencyRepository->getAllInstalledCurrencies($localeCode);
208.
209. $priceSpecifications = new PriceSpecificationMap();
210. foreach ($currencies as $currency) {
211. // Build the spec
212. $thisPriceSpecification = (new SpecificationFactory())->buildPriceSpecification(
Argument [0] es-es
145. {
146. if (!isset($this->locales[$localeCode])) {
147. $this->locales[$localeCode] = new Locale(
148. $localeCode,
149. $this->getNumberSpecification($localeCode),
150. $this->getPriceSpecifications($localeCode),
151. new NumberFormatter($this->roundingMode, $this->numberingSystem)
152. );
153. }
154.
155. return $this->locales[$localeCode];
Argument [0] es-es
191. $this->container = $this->buildContainer();
192. }
193.
194. $localeRepo = $this->get(self::SERVICE_LOCALE_REPOSITORY);
195. $this->context->currentLocale = $localeRepo->getLocale(
196. $this->context->language->getLocale()
197. );
198.
199. Hook::exec(
200. 'actionControllerInitAfter',
201. [
Argument [0] es-es
278. return;
279. }
280.
281. self::$initialized = true;
282.
283. parent::init();
284.
285. // enable Symfony error handler if debug mode enabled
286. $this->initDebugguer();
287.
288. // If current URL use SSL, set it true (used a lot for module redirect)
282. /**
283. * Starts the controller process (this method should not be overridden!).
284. */
285. public function run()
286. {
287. $this->init();
288. if ($this->checkAccess()) {
289. // setMedia MUST be called before postProcess
290. if (!$this->content_only && ($this->display_header || (isset($this->className) && $this->className))) {
291. $this->setMedia();
292. }
513. if (isset($params_hook_action_dispatcher)) {
514. Hook::exec('actionDispatcher', $params_hook_action_dispatcher);
515. }
516.
517. // Running controller
518. $controller->run();
519.
520. // Execute hook dispatcher after
521. if (isset($params_hook_action_dispatcher)) {
522. Hook::exec('actionDispatcherAfter', $params_hook_action_dispatcher);
523. }
23. * @copyright Since 2007 PrestaShop SA and Contributors
24. * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
25. */
26.
27. require dirname(__FILE__).'/config/config.inc.php';
28. Dispatcher::getInstance()->dispatch();