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(); 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); 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); diff --git a/magmi/plugins/base/itemprocessors/configurables/magmi_configurableprocessor.php b/magmi/plugins/base/itemprocessors/configurables/magmi_configurableprocessor.php index 3d9011b5..322fcbe5 100644 --- a/magmi/plugins/base/itemprocessors/configurables/magmi_configurableprocessor.php +++ b/magmi/plugins/base/itemprocessors/configurables/magmi_configurableprocessor.php @@ -37,9 +37,9 @@ 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 AND ea.is_configurable=1"; + $cond .= " AND ea.is_global=1"; } $sql .= " WHERE $cond GROUP by ea.attribute_id";