Quite a new install of Magento, Products are setup etc and was just about to export a product CSV and once I submitted the normal form, The error "No valid data sent" I started doing some debug to see what was going off. First stop was the exception.log
Notice: Undefined index: in /app/code/core/Mage/ImportExport/Model/Export/Entity/Product.php on line 539' in /app/code/core/Mage/Core/functions.php:245
The function thats causing the problem is:
/**
* Update data row with information about categories. Return true, if data row was updated
*
* @param array $dataRow
* @param array $rowCategories
* @param int $productId
* @return bool
*/
protected function _updateDataWithCategoryColumns(&$dataRow, &$rowCategories, $productId)
{
if (!isset($rowCategories[$productId])) {
return false;
}
$categoryId = array_shift($rowCategories[$productId]);
$dataRow[self::COL_ROOT_CATEGORY] = $this->_rootCategories[$categoryId];
if (isset($this->_categories[$categoryId])) {
$dataRow[self::COL_CATEGORY] = $this->_categories[$categoryId];
}
return true;
}
For somereason, $categoryId doesn't get set as $rowCategories isn't an Array.
I've re-run the index management just incase, but it seems to me like theres something wrong with the Categories or something. I know a quick fix is to check that the $categoryId is set before continuing, but I'd like to know what's causing the error in the first place.