Magento – What could cause random products to be removed from their categories

debuggingmagento-1.7

I realize this is a very open ended question, but I'm hoping that someone might be able to shed some light on an issue I'm experiencing. There are over 4000 products in my Magento store. For the most part they were all categorized (possibly 1 or 2 not in a category). We are now noticing that about 2000 of our products are now uncategorized, when literally 2 days ago everything was fine.

Has anyone ever experienced anything list this? No one who has been working on the site can think of anything they might have done to cause this and we didn't add any new extensions that weren't already on there.

Im not even sure where to begin here…

The extensions we're currently using are

Re – Authorize + Order Editor + Grid manager + Invoice Editor
Checkout Discount Code Magento Extension
MANAdev Shop by Special
Magento Store Pickup Shipping Module
PDF print-out
Enhanced Admin Grids

Best Answer

A big thank you to the team at ParadoxLabs who helped figure out this issue. I thought I would pass the solution to my problem along incase anyone else should have similar issues.

When we first noticed this issue a few months ago we were updating the categories description. After examining the database, logs, extensions, etc., we started trying various actions in an attempt to trigger the bug (all this was done on a staging site). We observed that only a single category was losing products.

Predictably, saving the 'Fabrics' category (the category that was losing the products) caused exactly the data loss we saw on the live site. Prior to saving there were ~2800 products assigned to the category. We added a word to the category description, clicked the 'Category Products' tab, then saved. After a long load, there were precisely 1001 products assigned to the category. Saving the category again through the same process was very quick and resulted in no further data loss.

Looking at the Magento logs after that, we found this error: "Warning: parse_str(): Input variables exceeded 1000. To increase the limit change max_input_vars in php.ini. in /app/code/core/Mage/Adminhtml/controllers/Catalog/CategoryController.php on line 310"

Seeing that the max input limit on our server is 1000 and there were 1001 products left after saving, that seems like too much of a coincidence to be ... coincidence.

We've since increased the php 'max_input_vars' value to 5000 or more, which fixed the error.

Thanks to everyone who took the time to help with this!