[PrestaShopDatabaseException]

Unknown column 'psi.id_country' in 'on clause'

SELECT p.id_product, p.price, psi.price_min, psi.price_max FROM (SELECT p.id_product, p.id_manufacturer, SUM(sa.quantity) as quantity, p.condition, p.weight, p.price, psales.quantity as sales FROM ek_product p LEFT JOIN ek_product_attribute pa ON (p.id_product = pa.id_product) LEFT JOIN ek_product_attribute_combination pac ON (pa.id_product_attribute = pac.id_product_attribute) LEFT JOIN ek_stock_available sa ON (p.id_product = sa.id_product AND IFNULL(pac.id_product_attribute, 0) = sa.id_product_attribute AND sa.id_shop_group = 1  AND sa.id_shop = 0 ) LEFT JOIN ek_product_sale psales ON (psales.id_product = p.id_product) INNER JOIN ek_category_product cp ON (p.id_product = cp.id_product) INNER JOIN ek_category c ON (cp.id_category = c.id_category AND c.active=1) INNER JOIN ek_product_shop ps ON (p.id_product = ps.id_product AND ps.id_shop = 1 AND ps.active = TRUE) LEFT JOIN ek_feature_product fp ON (p.id_product = fp.id_product) WHERE ((fp.id_feature_value=7854)) AND p.visibility IN ('both', 'catalog') AND c.nleft>=4 AND c.nright<=11 AND ps.id_shop='1' GROUP BY p.id_product) p INNER JOIN ek_layered_price_index psi ON (psi.id_product = p.id_product AND psi.id_shop = 1 AND psi.id_currency = 1 AND psi.id_country = 8) GROUP BY p.id_product ORDER BY psi.price_min ASC LIMIT 0, 28

at line 746 in file classes/db/Db.php

741.         if ($webservice_call && $errno) {
742.             $dbg = debug_backtrace();
743.             WebserviceRequest::getInstance()->setError(500, '[SQL Error] '.$this->getMsgError().'. From '.(isset($dbg[3]['class']) ? $dbg[3]['class'] : '').'->'.$dbg[3]['function'].'() Query was : '.$sql, 97);
744.         } elseif (_PS_DEBUG_SQL_ && $errno && !defined('PS_INSTALLATION_IN_PROGRESS')) {
745.             if ($sql) {
746.                 throw new PrestaShopDatabaseException($this->getMsgError().'<br /><br /><pre>'.$sql.'</pre>');
747.             }
748. 
749.             throw new PrestaShopDatabaseException($this->getMsgError());
750.         }
751.     }