Extension Error When Exporting Report in XML or CSV

Submitted by Eric on Thu, 03/29/2018 - 21:05
excel banner

Hello everyone, we have another new tutorial for you to fix a possible problem in your store.

Have you ever come across the problem of when exporting your report in XML or CSV the file comes with an extension like this:

  • invoiced.csv-, attachment
  • invoiced.xml-, attachment

Well, this is quite common for you to use some versions of Magento and also some versions of some browsers. The solution is quite simple.

Open file: app/code/core/Mage/Core/Controller/Varien/Action.php

Find:

->setHeader('Content-Disposition', 'attachment; filename="'.$fileName.'"', true)

Replace:

->setHeader('Content-Disposition', 'attachment; filename="'.$fileName.'";', true)

Done, refresh cache and test again.

Until the next tutorial here on MageBR.


FacebookTwitterGoogle+Share