From 411e928db5e9787d90385d406eede7ff559b96be Mon Sep 17 00:00:00 2001 From: Adam Date: Thu, 19 Mar 2015 11:53:29 +0000 Subject: [PATCH 1/2] https://github.com/dweeves/magmi-git/issues/158 https://github.com/dweeves/magmi-git/issues/158 --- .../extra/itemprocessors/categories/categoryimport.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/magmi/plugins/extra/itemprocessors/categories/categoryimport.php b/magmi/plugins/extra/itemprocessors/categories/categoryimport.php index 573f22af..52e386c1 100644 --- a/magmi/plugins/extra/itemprocessors/categories/categoryimport.php +++ b/magmi/plugins/extra/itemprocessors/categories/categoryimport.php @@ -120,7 +120,7 @@ public function getCategoryId($parentpath, $cattrs) FROM $cet as cce LEFT JOIN $cet as eac ON eac.parent_id=cce.entity_id WHERE cce.entity_id=? - GROUP BY eac.parent_id"; + GROUP BY eac.parent_id,cce.entity_type_id"; $info = $this->selectAll($sql, array($parentid)); $info = $info[0]; // insert new category @@ -469,4 +469,4 @@ public function afterImport() $this->update($sql); return true; } -} \ No newline at end of file +} From a4cd1654d4fe09c2a91c6e1d9dc9e5c8722cb525 Mon Sep 17 00:00:00 2001 From: Adam Date: Thu, 19 Mar 2015 12:02:41 +0000 Subject: [PATCH 2/2] Update categoryimport.php Fixes group by error when using ONLY_FULL_GROUP_BY MySQL configuration option --- .../plugins/extra/itemprocessors/categories/categoryimport.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/magmi/plugins/extra/itemprocessors/categories/categoryimport.php b/magmi/plugins/extra/itemprocessors/categories/categoryimport.php index 52e386c1..0f3dc3ca 100644 --- a/magmi/plugins/extra/itemprocessors/categories/categoryimport.php +++ b/magmi/plugins/extra/itemprocessors/categories/categoryimport.php @@ -120,7 +120,7 @@ public function getCategoryId($parentpath, $cattrs) FROM $cet as cce LEFT JOIN $cet as eac ON eac.parent_id=cce.entity_id WHERE cce.entity_id=? - GROUP BY eac.parent_id,cce.entity_type_id"; + GROUP BY eac.parent_id,cce.entity_type_id,cce.attribute_set_id,level"; $info = $this->selectAll($sql, array($parentid)); $info = $info[0]; // insert new category