sameday-courier / magento-2-plugin

Magento 2 plugin for Sameday Courier shipping
4 stars 8 forks source link

Incompatibility with MSI #59

Open ethmelly opened 3 months ago

ethmelly commented 3 months ago

When MSI is enabled and you try to create a new shipment from adminhtml the page is broken due to the injected html from sameday_create_awb_modal.phtml

The popup-add-awb contains a form element which is not allowed to have nested form tags thus breaking the default form.

image

The above screenshot is with the html content removed from the page.

image And the above screenshot is with the html content added to the page where you can see the form tag is closed unexpected thus preventing the form data to be submited to the request.

As a quick workaround for our client we have removed the html content to be added to the new shipment form page by changing the plugin method for afterToHtml to if(in_array('sales_order_view',$subject->getLayout()->getUpdate()->getHandles()))