Product export duplicate rows for product in Magento 2.1.2 or 2.1.x


Preconditions

  1. Tag 2.1.2

Steps to reproduce

  1. Open admin panel
  2. Edit any product
  3. Add description that has quotes " or any other html special char
  4. Save Product
  5. Go to System - Export - Products
  6. Export products
Expected


Actual result



change in file app/code/Magento/CatalogImportExport/Model/Export/Product.php


if ($storeId != Store::DEFAULT_STORE_ID  && isset($data[$itemId][Store::DEFAULT_STORE_ID][$fieldName])
 && $data[$itemId][Store::DEFAULT_STORE_ID][$fieldName] == $attrValue) {
 continue;
 }

replace marked line with

&& $data[$itemId][Store::DEFAULT_STORE_ID][$fieldName] == htmlspecialchars_decode($attrValue)


Comments

Popular posts from this blog

Static Content Loading issue when Upgrade From Magento 2.1.0 to Magento 2.1.3

How to debug Magento