I received an error when trying to export product data in Magento 1.9. It said "no valid data sent". Based on other posts, I was able to locate my `system.log' (in var/log folder & changed permissions to 777). It looks like there are several errors and i'm not sure when they occurred or which to look at. The last one, which seems relevant, is:
Notice: Undefined offset: 331 in includes/src/Mage_ImportExport_Model_Export_Entity_Product.php on line 875.
I read that 331 = Product ID
. But, when I go to manage products, there is no product ID of 331. I may have added it a few weeks ago when I was testing uploads, but I've since deleted it. So, I'm not sure what to do there.
I also tried to locate the file mentioned in the error, but it wasn't in that file path. I ended up going to:
app/code/core/Mage/ImportExport/Model/Export/Entity.
(I assume that is the right file to review). The code on line 873-5
is:
} else {
$dataRow[self::COL_STORE] = null;
$dataRow += $stockItemRows[$productId];
Any advice on next steps? Your help is greatly appreciated!
Please note: I also checked my exceptions.log and it doesn't look as if anything has been added to the file since Aug 11.
First of all, your permissions are wrong. Run the following commands under SSH within the same directory as your Magento installation.
find . -type f -exec chmod 644 {} \;
find . -type d -exec chmod 755 {} \;
chmod 550 pear
chmod 550 mage #for magento 1.5+
I also smell compilation all over this.
Disable Compilation from Magento Admin Panel.
[System -> Tools -> Compilation -> Disable]
Also clear all Core/Storage cache via SSH. Run the following commands,
cd <your-magento-installation-directory>/var/cache/
rm -rf *
Retry your data export again.
I ended up solving back changing the code on line 875:
} else {
$dataRow[self::COL_STORE] = null;
if ($productId < 331 and $productId > 333) $dataRow += $stockItemRows[$productId];