Actually what is missing is the master_categories_id on the Products in the products table ...

Do you use Linked Products?

If not, you can fix this in the Tools ... Store Manager ...
Reset ALL Products Master Categories ID
to be used for Linked Products and Pricing: Reset
Update All Products' Attribute Sort Orders
to match Option Value Default Sort Orders:
Update
which may be what chadderuski meant, but just showed the wrong one ...

If you do use Linked Products, you will need to review the Products as the master_categories_id will pick up the lowest categories_id in the products_to_categories table for the master_categories_id ... and this may or may not be correct ... so those Products will need to be adjusted ...