I have upgraded Magento version from 2.1.4 to 2.2.1. Upgrade was successfull but once after Upgrade when i open homepage it's showing following error,

1 exception(s):
Exception #0 (Magento\Framework\Config\Dom\ValidationException): Element 'body': Character content other than whitespace is not allowed because the content type is 'element-only'.
Line: 408

Can anyone please suggest how to figure out this issue.


Finally, Issue has been fixed. It was custom module having the bug in xml layout (Static text was there).

checkout cart index instead of <!-- checkout cart index-->

| improve this answer | |

This is how I fixed this error: I removed one by one xml files, till I found in which one is the problem, and I found it in one of the extensions. Hope this is helpful for you :)

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy