May 18, 20224 yr You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ')) GROUP BY fv.id_feature, IFNULL(fv.custom, 0)' at line 3 in file controllers/admin/AdminFeaturesController.php at line 745 SELECT id_feature, IFNULL(fv.custom, 0) as is_custom, COUNT(fv.id_feature_value) as count_values FROM `ps_feature_value` fv WHERE (fv.id_feature IN ()) GROUP BY fv.id_feature, IFNULL(fv.custom, 0) $ids = array_map('intval', array_column($this->_list, 'id_feature')); 728: $extra = []; 729: foreach ($ids as $id) { 730: $extra[$id] = [ 731: 'value' => 0, 732: 'custom' => 0, 733: 'products' => 0, 734: ]; 735: } 736: 737: $conn = Db::getInstance(_PS_USE_SQL_SLAVE_); 738: 739: // count feature values 740: $valuesQuery = new DbQuery(); 741: $valuesQuery->select('id_feature, IFNULL(fv.custom, 0) as is_custom, COUNT(fv.id_feature_value) as count_values'); 742: $valuesQuery->from('feature_value', 'fv'); 743: $valuesQuery->where('fv.id_feature IN ('. implode(',', $ids).')'); 744: $valuesQuery->groupBy('fv.id_feature, IFNULL(fv.custom, 0)'); 745: $res = $conn->executeS($valuesQuery); 746: if (is_array($res)) { 747: foreach ($res as $row) { 748: $id = (int)$row['id_feature']; 749: if ($row['is_custom']) { 750: $extra[$id]['custom'] = (int)$row['count_values']; 751: } else { 752: $extra[$id]['value'] = (int)$row['count_values']; 753: } 754: } 755: } What is causing this issue? I'm on almost latest bleeding edge and I have features in other 2 shops with this version. I didn't need them in this one until now. Cheers!
May 18, 20224 yr 2 hours ago, the.rampage.rado said: WHERE (fv.id_feature IN ()) Hard to tell i.e. what is that for v.id_feature IN ???
May 19, 20224 yr try to change: $valuesQuery->select('id_feature, IFNULL(fv.custom, 0) as is_custom, COUNT(fv.id_feature_value) as count_values'); to: $valuesQuery->select('fv.id_feature, IFNULL(fv.custom, 0) as is_custom, COUNT(fv.id_feature_value) as count_values');
May 19, 20224 yr Solution Fixed in latest bleeding edge, thanks for reporting this issue. https://github.com/thirtybees/thirtybees/commit/c024695e15c5a7f0f8c3b6fdf7859d150a577154
May 20, 20224 yr Author @datakick - can we merge this one as well@ Unrelated but very nice feature that works flawlessly in the time I'm using it.https://github.com/thirtybees/thirtybees/pull/1416 Thanks!
Create an account or sign in to comment