It is in the checkout process. It seems the ajax call get 500. It only appears in the local environment. I don't know how to fix it...

The URL is: {localhost}/default/rest/default/V1/guest-carts/0b5bcc2be8ad76a0328858ee01fadb17/estimate-shipping-methods

Status Code:500


1 exception(s): Exception #0 (Magento\Framework\Exception\LocalizedException): Invalid XML in file C:/xampp/htdocs/local/vendor/magento/module-checkout/etc/webapi_rest/events.xml: Element 'config': Missing child element(s). Expected is ( event ). Line: 2

  • I think the error is pretty self-explanatory. – Julien Lachal Dec 8 '16 at 12:09
  • Yeah, the error says there is no child element in the xml file, but I look at the same file in another host who can send the ajax call successfully, the xml file is the same... – Jessie Dec 9 '16 at 2:46

Take a look at the Unit Test: vendor/magento/framework/Event/Test/Unit/Config/_files/invalidEventsXmlArray.php

'without_event_handle' => [
        '<?xml version="1.0"?><config></config>',
        ["Element 'config': Missing child element(s). Expected is ( event ).\nLine: 1\n"],

So, may need to check our events xml config in our custom module again.

| improve this answer | |
  • Fixed. It is the xml problem. should add the xml event handler child node. Thanks ! – Jessie Dec 9 '16 at 5:10
  • @Jessie if my answer is helpful, please accept it. – Khoa TruongDinh Dec 17 '16 at 10:50

Not the answer you're looking for? Browse other questions tagged or ask your own question.