frustrated woman at computer screen.

Magento Export Blank Screen? Unsupported Operand Types Error? Try this fix.

On a couple different Magento sites, one of them running CE version 1.7.0.2 and the other running CE version 1.8.0.0, I was having trouble exporting even limited selections of the catalog from the System > Import/Export function of the admin. In some cases clearing the cache would resolve the issue, but not always. I increased the PHP memory_limit setting, and that also did not resolve the issue. Finally I checked my PHP error logs and saw an “Unsupported operand types” error message related to the core product export file. Here’s what fixed it on a (so far) permanent basis:

1. Override the core file.

Create a duplicate copy of

app/code/core/Mage/ImportExport/Model/Export/Entity/Product.php

and place it in

app/code/local/Mage/ImportExport/Model/Export/Entity/

creating that directory structure within /local/ if need be.

2. Edit the local file.

Open the duplicate copy of product.php which you created in the local directory structure and go to line 876 (in v 1.8.0.0) or line 873 (in v 1.7.0.2) and replace the following line of code:

$dataRow += $stockItemRows[$productId];

with this:

$dataRow = array_merge($dataRow,$stockItemRows[$productId]);

And that’s it! Magento will now use the local copy of Product.php instead of the core version and your export command will produce the .csv file you’re looking for, not the blank screen that you hate.

H/T to Roshal Lal for the solution. This is simply an update of his solution for my own records and with updated line numbers.

Published by

Brian Lyman

Brian is the founder of Vale Studios, which is really just a stage name for what has been a great experience in freelancing. Brian is currently working under a dedicated contract for a terrific e-commerce retailer, but he uses this space to continue publishing ideas and reflections related to e-commerce, marketing, and Magento.

Leave a Reply

Your email address will not be published. Required fields are marked *