Closed bh-ref closed 8 years ago
Sorry, seems to be a problem with an extension (I just disabled all non-Magento modules and the problem is gone).
What extensions are you running. I had this issue after I ran the migration script.
Currently I have "sjparkinson/static-review": "~4.1", "classyllama/module-avatax": "^0.3.3", "subscribepro/subscribepro-magento2-ext": "^1.0", "magefan/module-login-as-customer": "^2.1", "ibnab/magento2-delete-orders": "*", "customerparadigm/ordercomments": "^100.0", "amasty/base": "^1.0", "amasty/module-mass-order-actions": "^1.0", "amasty/preorder": "^1.0", "magento/data-migration-tool": "2.1.3", "weltpixel/maxmind": "^1.0", "weltpixel/m2-weltpixel-backend": "^1.0", "magestore/giftvoucher-magento2": "^1.0", "magestore/rewardpoints-magento2": "^1.0"
As far as I can see, the only matching extension which was activated at that time was "amasty/base".
Maybe it helps to disable all the extension, let the list of products appear, and then reenable the extension (maybe one by one)?
I tried removing all my extensions and no luck I didn't have this issue until I did a migration from mage 1. I had all my extensions installed before I migrated over.
I tried to raise the limit for appendXML() back then as well. Without success, too. Maybe you can create a copy of your database, delete half of the products, check, and if the problem still exist, create another copy and delete the other half of the products. If one half of the products produces the error, continue to half the products further until you manage to find the product which produces this issue (if it is a product which produces the issue). Just my guess, I really do not know what to do else, I am sorry. Maybe the best idea is to open a new ticket?
Well I am wondering why the xml is even needed it's just holding a json object.
<script type="text/x-magento-init"><![CDATA[{"*": [{"junk":"25mb of junk"}]}]]></script>
There is allot of junk code wrapping this. I think the proper solution would be to make this a literal object. Its just a ton of unneeded bloat causing a performance bottle kneck for what? To make this break after to many records?
<script>
var tmpObject = {"*": [{"junk":"25mb of junk"}]};
</script>
I created this ticket. https://github.com/magento/magento2/issues/8084
@bh-ref check out my link I made a grid that works! on ticket 8084
@joshspivey cool, I am glad you found a working solution / fix! I just realize now that you have problems with the sales/order grid, whereas I was having trouble with the product grid. But maybe your fix is easily applicable for that as well. In my installation, the problem is not appearing anymore, but it sure is good to know there is an alternative available.
@bh-ref yah you have to much product data. If its making a XML file over 10mb you will have this issue. All the grids on Mage 2 load all XML at once which is not good if you have allot of data on any part of the site. I chose to use backbone grid because the knockout grids didn't have anything close the functionality as backgrid and I don't want to spend months working on a fix for something that takes a couple days to make. The grid script built in mage 2 looked like they tried to roll there own and was very minimal at best. It needs a lot of functionality.
You can change it out to products in a couple of hours.
just swap out \Magento\Sales\Api\OrderRepositoryInterface $orderRepository, to product repo and SortOrderBuilder to SortProductBuilder
Then in https://github.com/joshspivey/magento2-sales-grid/blob/master/view/adminhtml/web/js/magentoGrid.js
update your columns to match the data
var processGrid = {
columns: [
{
name: 'entity_id',
label: 'Order ID',
editable: false,
cell: Backgrid.IntegerCell.extend({
orderSeparator: ''
})
},
{
name: 'increment_id',
label: 'Increment ID',
editable: false,
cell: Backgrid.IntegerCell.extend({
orderSeparator: ''
})
},
{
name: 'status',
label: 'Status',
editable: false,
cell: 'string'
},
{
name: 'created_at',
label: 'Created At',
editable: false,
cell: timeDateFormat
},
{
name: 'updated_at',
label: 'Updated At',
editable: false,
cell: timeDateFormat
},
{
name: 'base_grand_total',
label: 'Base Grand Total',
editable: false,
cell: 'string'
},
{
name: 'base_total_paid',
label: 'Base Total Paid',
editable: false,
cell: 'string'
},
{
name: 'customer_email',
label: 'Customer Email',
editable: false,
cell: 'string'
}
]
};
There are some other minor tweaks needed.
Then to get it to show up on the product menu
edit https://github.com/joshspivey/magento2-sales-grid/blob/master/etc/adminhtml/menu.xml
change Magento_Sales::sales_operation to the products section
We had same a problem with orders grid. It contained around 15000 records. Issue occured when sales_order_grid.xml massAction component was extended in our custom Module. So if third party module is adding custom mass action to gird and grid has a lot of records, probably this error will appear. In our example in order grid, without custom mass action CData was 52Kb. When custom mass action enabled, CData raised to 22Mb
Steps to reproduce
Expected result
Actual result
Warning: DOMDocumentFragment::appendXML(): Entity: line 1: parser error : CData section too big found in /magento/lib/internal/Magento/Framework/View/TemplateEngine/Xhtml/Template.php on line 60