Migration from Magento1 to Magento2 was done using the data migration tool successfully.

However, certain product pages end up throwing the exception as seen on the attached screenshot.

To isolate the issue, I did even disable the custom module created for data migration. enter image description here

3 Answers 3


The answer posted by @CodeForGood is correct but incomplete.

I got this error in the category pages too.

No matter where you get it, the root of the issue is the same.

This happen because Data Migration Tool migrates the NULL values as string, instead of NULL itselfs.

For example, in the screenshot below there are 2 rows. Note the column custom_layout_update_file.

The first row was created by Data Migration Tool (INCORRECT). The second row is a new category created by me manually from the Magento 2 dashboard (CORRECT).

To fix this massively, run the following SQL query:


In my case, the problem was being generated by the category attribute custom_layout_update_file. Its attribute_id is 530 and the column is located at catalog_category_entity_text. So, my final query was:

UPDATE catalog_category_entity_text SET value = NULL WHERE attribute_id = '530'

Then, reindex and clear cache:

bin/magento i:rei && bin/magento c:c && bin/magento c:f

Your product/category pages should be working properly now :)

enter image description here


May be help you this...

This issue is XML file issue.

Your any custom module you missed White space.

This problem you got because the XML code, you copy directly on internet/webpage, there is some hidden character before start each line. This isn't space/ newline character. So, when push to Magento, Magento doesn't know this character, and it shows errors as your message. Solutions: clear all space between tag and order again.

And refer this link :-

Magento 2 : How to solve the message "Character content other than whitespace"?

  • Hi Mohit, thanks, I have already tried this without any luck before posting here. Mar 8, 2020 at 16:22
  • Turns out this was an issue with the custom module we had purchased, and was a result of an error in their di.xml file. Mar 8, 2020 at 16:30
  • I don't have any custom module yet on the new migrated site. So, I'm not sure where it is originating from. Mar 8, 2020 at 16:32
  • you created xml file in custom module or custom theme Mar 8, 2020 at 16:36
  • you created today any xml files?? Mar 8, 2020 at 16:38

The issue with the product page displaying the error above got clear when the cause was found to be something around attribute set migrated from Magento I had to move custom_layout_update_file from from unassigned attributes on the right to the right group on the left. I attached the screenshots for your reference.

Once this is done, one can now view an option 'Custom Layout Update' under Migration_Design tab that you see on editing a product from the admin.

The value to choose from the Custom Layout Update drop down for the product that displays XML errors is 'No Update' and save it. enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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