From b000a21daea0194112d86f41128f59fa2067d609 Mon Sep 17 00:00:00 2001 From: Martin Aarhof Date: Thu, 12 Sep 2019 10:34:34 +0200 Subject: [PATCH 1/5] Removed is_configurable=1 from configurable_processor --- .../configurables/magmi_configurableprocessor.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/magmi/plugins/base/itemprocessors/configurables/magmi_configurableprocessor.php b/magmi/plugins/base/itemprocessors/configurables/magmi_configurableprocessor.php index 3d9011b5..c67d1838 100644 --- a/magmi/plugins/base/itemprocessors/configurables/magmi_configurableprocessor.php +++ b/magmi/plugins/base/itemprocessors/configurables/magmi_configurableprocessor.php @@ -39,7 +39,7 @@ public function getConfigurableOptsFromAsId($asid) $cea = $this->tablename("catalog_eav_attribute"); $sql .= " JOIN $cea as cea ON cea.attribute_id=ea.attribute_id AND cea.is_global=1 AND cea.is_configurable=1"; } else { - $cond .= " AND ea.is_global=1 AND ea.is_configurable=1"; + $cond .= " AND ea.is_global=1"; } $sql .= " WHERE $cond GROUP by ea.attribute_id"; From 83864463f7305f3026431b63d332639b3660e4a2 Mon Sep 17 00:00:00 2001 From: Martin Aarhof Date: Thu, 12 Sep 2019 13:07:28 +0200 Subject: [PATCH 2/5] Removed the sql_mode only_full_group_by, due to COALESCE requires the field to be grouped, which it isnt --- magmi/inc/dbhelper.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/magmi/inc/dbhelper.class.php b/magmi/inc/dbhelper.class.php index bca0a2de..8be91578 100755 --- a/magmi/inc/dbhelper.class.php +++ b/magmi/inc/dbhelper.class.php @@ -55,7 +55,7 @@ public function initDb($host, $dbname, $user, $pass, $port = 3306, $socket = "/t $pdostr = "mysql:host=$host;port=$port;dbname=$dbname;charset=utf8"; } - $this->_db = new PDO($pdostr, $user, $pass, array(PDO::MYSQL_ATTR_INIT_COMMAND=>"SET NAMES utf8")); + $this->_db = new PDO($pdostr, $user, $pass, array(PDO::MYSQL_ATTR_INIT_COMMAND=>"SET NAMES utf8, sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));")); // use exception error mode $this->_db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $this->_db->setAttribute(PDO::ATTR_ORACLE_NULLS, PDO::NULL_NATURAL); From 2284f7f60333754f19350bb85f94d2845fbae233 Mon Sep 17 00:00:00 2001 From: Martin Aarhof Date: Thu, 12 Sep 2019 13:08:18 +0200 Subject: [PATCH 3/5] Removed is_configurable=1 from configurable_processor --- .../configurables/magmi_configurableprocessor.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/magmi/plugins/base/itemprocessors/configurables/magmi_configurableprocessor.php b/magmi/plugins/base/itemprocessors/configurables/magmi_configurableprocessor.php index c67d1838..322fcbe5 100644 --- a/magmi/plugins/base/itemprocessors/configurables/magmi_configurableprocessor.php +++ b/magmi/plugins/base/itemprocessors/configurables/magmi_configurableprocessor.php @@ -37,7 +37,7 @@ public function getConfigurableOptsFromAsId($asid) $cond = "ea.is_user_defined=1"; if ($this->checkMagentoVersion("1.3.x", "!=")) { $cea = $this->tablename("catalog_eav_attribute"); - $sql .= " JOIN $cea as cea ON cea.attribute_id=ea.attribute_id AND cea.is_global=1 AND cea.is_configurable=1"; + $sql .= " JOIN $cea as cea ON cea.attribute_id=ea.attribute_id AND cea.is_global=1"; } else { $cond .= " AND ea.is_global=1"; } From 4c425236a30dc983971def761271ec2867bdbb81 Mon Sep 17 00:00:00 2001 From: Martin Aarhof Date: Fri, 13 Sep 2019 13:37:00 +0200 Subject: [PATCH 4/5] setting max traces to 10 - for magento2 --- magmi/inc/magmi_engine.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/magmi/inc/magmi_engine.php b/magmi/inc/magmi_engine.php index 74b735a9..3cbbfdf7 100755 --- a/magmi/inc/magmi_engine.php +++ b/magmi/inc/magmi_engine.php @@ -391,9 +391,11 @@ public function getExceptionTrace($tk, &$traces) $this->_excid++; $trstr = ""; //FIXME: infinity loop in M2 + + $counter = 0; foreach ($traces as $trace) { if (isset($trace["file"])) { - $fname = str_replace(dirname(dirname(__FILE__)), "", $trace["file"]); + $fname = str_replace(dirname(__DIR__), "", $trace["file"]); $trstr .= $fname . ":" . (isset($trace["line"]) ? $trace["line"] : "?") . " - "; if (isset($trace["class"])) { $trstr .= $trace["class"] . "->"; @@ -407,6 +409,11 @@ public function getExceptionTrace($tk, &$traces) $trstr .= "\n"; } } + + // Simple max traces fix + if (++$counter % 10) { + break; + } } if (!isset($this->_exceptions[$tk])) { $this->_exceptions[$tk] = array(0,$this->_excid); From bae4a573dfb15998acefbf4ab88767fa30fc811b Mon Sep 17 00:00:00 2001 From: Martin Aarhof Date: Wed, 16 Oct 2019 10:49:40 +0200 Subject: [PATCH 5/5] Undefined index: nsku in magmi/engines/magmi_productimportengine.php on line 2124 --- magmi/engines/magmi_productimportengine.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/magmi/engines/magmi_productimportengine.php b/magmi/engines/magmi_productimportengine.php index 9e53421a..02989af7 100755 --- a/magmi/engines/magmi_productimportengine.php +++ b/magmi/engines/magmi_productimportengine.php @@ -67,7 +67,11 @@ class Magmi_ProductImportEngine extends Magmi_Engine //magento stock related table columns list private $_stockcols = array(); //stats - private $_skustats = array(); + private $_skustats = array( + 'nsku' => 0, + 'ok' => 0, + 'ko' => 0, + ); //handlers cache private $_handlercache = array();