AvS_FastSimpleImport icon indicating copy to clipboard operation
AvS_FastSimpleImport copied to clipboard

backend import: Undefined offset in $_newSku array

Open amenk opened this issue 8 years ago • 4 comments

Import CSV with empty weight of a bundle product

Getting Notice: Undefined offset: 1102 in /app/code/community/AvS/FastSimpleImport/Model/Import/Entity/Product.php on line 1124

I have put a breakpoing in public/app/code/community/AvS/FastSimpleImport/Model/Import/Entity/Product.php

               $sku = false; // child rows of legacy products with unsupported types are orphans
            }
        } else { // validate new product type and attribute set
            if ($sku == '1102') xdebug_break();
            if (!isset($rowData[self::COL_TYPE])
                || !isset($this->_productTypeModels[$rowData[self::COL_TYPE]])
            ) {

This xdebug_break is not hit during the real import, but during dry-run phase it is hit.

amenk avatar Jul 07 '16 16:07 amenk

Is not related to the weight - was just a guess.

amenk avatar Jul 07 '16 16:07 amenk

Maybe it's because it's the last article

amenk avatar Jul 07 '16 16:07 amenk

nope, adding a dummy after that one does not help any ideas?

amenk avatar Jul 07 '16 16:07 amenk

I think I found the problem.

validateRow is marking rows as already validated, but the passed rowNum is reset per bunch when importing. So if row 0 was validated, row 25 is not validated anymore (and the attributeset ID not set). Actually it is a bit strange, that the attributeSet is set during validation - sound's like a sideeffect for me

amenk avatar Jul 08 '16 09:07 amenk