Closed gerryka closed 7 years ago
Are you sure that IE is necessary to reproduce the issue? Since the error in question is server-side, that seems unlikely.
In my experience, there's also a high probability that the error's root cause is a custom or 3rd-party module which attempts to modify the looks of the Orders' grid. In order to confirm that, please check your Magento's logs for errors first (Read here on how to find those), there might be an extra error caused by Invalid XML. (Alternatively, you could attempt to reproduce the issue on a clean installation of Magento CE and test whether the error persists)
This is on a clean installation of Magento CE without any 3rd party modules or custom modules. I was not able to reproduce the issue on any other browser except this specific configuration of IE11 with compatibility mode turned on.
And yes it also seems very unlikely to me that a browser setting would cause an error in PHP server-side code. But so far it is what I am seeing here. I will debug further and see what I can come up with.
Sadly i did not come up with any further info from my (limited) debugging session. I would appreciate it if anyone could take a look at this. Should be pretty easy to reproduce with the above instructions.
This seems to stem from the HTTP Accept header.
Some testing shows the following:
Chrome (60.0.3112.113) sends
Accept:text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
IE 11 with activated compatiblity mode sends:
Accept:image/gif, image/jpeg, image/pjpeg, application/x-ms-application, application/xaml+xml, application/x-ms-xbap, */*
Note that both strings contain "*/*
", allowing any MIME type.
The problem then begins in \Magento\Framework\View\Element\UiComponent\Context::setAcceptType
Because the IE´s Accept header contains the string 'xml', XML is then chosen.
We then continue in \Magento\Framework\View\Element\UiComponent\Context::getRenderEngine, which uses the chosen accept type to select the render engine: Magento\Framework\View\Element\UiComponent\ContentType\Xml
This seems to be the heart of the issue. I am hesitant to create a pull request for a fix, because I have no idea if changing the setAcceptType function has adverse effects on other areas of Magento, but maybe the Magento team can use this.
Edit: The comment system has swallowed part of the accept string. correcting.
@gerryka, thank you for your report. We were not able to reproduce this issue by following the steps you provided. If you'd like to update it, please reopen the issue. We tested the issue on 2.3.0-dev, 2.2.0, 2.1.9
Preconditions
Steps to reproduce
Expected result
Actual result