0

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

5
  • Potentially some scheduled task, if no one did make any changed physically in your admin. I suggest you install the module AOE_Scheduler (fabrizio-branca.de/magento-cron-scheduler.html) which will give you a view on what crons are enabled. You can then run 'suspect' ones and see if they cause the issue.
    – ProxiBlue
    Commented Aug 21, 2013 at 22:13
  • Might be a good idea to grep through any module code or any code under app/code/local/Mage for something that is loading a product model (or category model, can't recall which one saves category info) and saving it. Something like Mage::getModel('catalog/product')...stuff...->save()
    – pspahn
    Commented Aug 21, 2013 at 23:56
  • @pspahn thanks I will check this out. I forgot to mention something kind of important. The site is "linking" back to my in store POS system which is using something called a "Linker" this is a custom API built by our In house POS "POSim" [link](posim.com/products/ecommerce/… )[/link]. Now I did speak to their developers today and they assured me that the "linker" did not cause the issue because it doesn't touch category info. Commented Aug 22, 2013 at 4:45
  • @ProxiBlue see above as well. Thank you for taking the time to respond. Commented Aug 22, 2013 at 4:45
  • @pspahn most likely in a PHP file, correct? Commented Aug 22, 2013 at 4:49

2 Answers 2

3

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!

2

The latest versions of PHP have a variable limit that plays havoc with category contents. You may be running up against an issue with a recent PHP version upgrade to a Magento system.

https://stackoverflow.com/questions/14851064/why-does-magento-keep-only-the-first-1000-products-in-a-category-after-saving-t

2
  • whats the best way to go about seeing if that is the issue and how to prevent it from happening.. Commented Aug 22, 2013 at 6:23
  • The .htaccess fix on the accepted answer on the link provided is easy to implement. If the max_input_vars setting being too low is your problem, you should see immediate relief from having any new maintenance dropping product out of your categories. Commented Aug 23, 2013 at 2:41

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.