Magento Product Export Not Working - getting "No Valid Data Sent" error

Are mysteriously corrupt records causing your exports to fail?
Are mysteriously corrupt records causing your exports to fail?

Sometimes Magento Community Edition version (and perhaps other versions) throw an error when you try to use the built-in product export feature. I've been able to find the particular product SKU's in my catalog that are causing the export routine to bomb, but I couldn't for the life of me figure out what was wrong with these records. I could not trace a specific condition back to the problematic records for something to blame, such as simple versus complex product types, attribute sets, funky characters or encoding, missing values - nothing. It seemed as if there was some sort of invisible problem with certain records that would cause the product export to fail.

I looked in the exception log and saw this super-helpful error message:

exception 'Exception' with message 'Notice: Undefined index: in /xxx/yyy/htdocs/zzz/app/code/core/Mage/ImportExport/Model/Export/Entity/Product.php on line 539' in /xxx/yyy/htdocs/zzz/app/code/core/Mage/Core/functions.php:245

Seeing as how the "Undefined index" error referenced no string value, I searched for something related to the conditional on line 534, just above the offending line #539 in /app/code/core/Mage/ImportExport/Model/Export/Entity/Product.php - and voilĂ ! I found a web gem located at which encouraged me to make a one-line tweak to this file. I followed the instructions, dumped cache and WHAMMO! my stock Magento data export routine came roaring to life, happily exporting my entire catalog like a champ.

Are you getting the "No Valid Data Sent" error when trying to export products from Magento? Give this a shot!

Important side-note: Thanks to one of my coworkers for pointing out that using this fix will prevent upgrades to that core file from taking effect in future releases. Better to make an extension to do the same thing, if you have the skill.