404 not found after domain change

Did you add some records directly in the DB

Also some of the older versions had a problem, maybe it is carried over

do

$ bench frappe --ipython
>>> from frappe.utils.nestedset import rebuild_tree
>>> rebuild_tree("Item Group", "parent_item_group")
>>> frappe.db.commit()

Check the fields…