'Category products don't match database

I have a script that deletes specific entries from [prefix]_category_product ( => removes products from a category) using SQL.

Though the changes are successfully made in the database and in the Prestashop admin interface, they don't show on the front-end. Some products which have been removed from a category still appear in it.

I don't think it's a caching issue because emptying the Prestashop cache and the browser cache doesn't work, and they don't disappear after a few days/weeks. If I add and remove the product from the category manually using the admin interface it works. What am I doing wrong?



Solution 1:[1]

You are forgetting the ps_product and ps_product_shop tables, where the id_category_default value is stored.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 user3256843