nopSolutions / GoogleShopping-plugin-for-nopcommerce

nopCommerce plugin for Google Shopping (feed)
https://www.nopcommerce.com/
GNU General Public License v3.0
11 stars 18 forks source link

your XML data feed file is too long and exceeds our size limit of 5,242,880 bytes (5 MB) or characters #9

Closed jigarsangoi closed 2 years ago

jigarsangoi commented 4 years ago

Hi,

With a few rules in Facebook catalog manager, we can use same feed file in Facebook catalog. But recently facebook updated some rules for feed file because of that we are getting this error when we try to upload file

Error = "your XML data feed file is too long and exceeds our size limit of 5,242,880 bytes (5 MB) or characters."

This error occurs due to, XML document doesn't use indent when generating XML file & if you open it in notepad then all text shown in one line.

so I resolved it by applying this solution var settings = new XmlWriterSettings { Encoding = Encoding.UTF8, Indent = true // newly added line };

Stackoverflow Link

After this modification even if you open a file in notepad, you will see single property only in each line. Also, facebook accepts this file for feed too.

1 more important thing is, file size increased from 20 MB to 23 MB in my case.

Thanks.

DmitriyKulagin commented 2 years ago

Closed #9