bangerkuwranger / Magento-2.1.3-500-Product-Category-Limit-Bug-Workaround

Magento 2.1.3 updated the ranging in category product indexing, and inadvertently limited indexed products in a category to 500. :-( However, patching a single function can undo this limit until an official bugfix is released... which is what this does.
MIT License
14 stars 3 forks source link

Is this limit fixed in Magento 2.1.8? #1

Open phiberr opened 7 years ago

phiberr commented 7 years ago

https://github.com/magento/magento2/issues/8018 It's mentioned that it might be fixed in 2.1.8.

Do you concur? Is there a harm if this is installed/running on a 2.1.8 install?

bangerkuwranger commented 7 years ago

I've checked the merged commits, and it appears that they have taken a different approach (one mentioned earlier in that thread) that SHOULD resolve the issue. I haven't tested this with a complete product DB in v2.1.8 yet, so I'd be interested to see if it does still work... but it shouldn't be necessary to use this module in 2.1.8 since their fix (using a properly initialized iterator for large collections rather than neutering the ranging) addresses the issue. That said, I believe the approach this module uses does not directly conflict with the changes in 2.1.8... and the same drawbacks (possible loss of performance, possible incorrect ranges in layered navigation) will persist. I wouldn't recommend using this with 2.1.8 for that reason, but if it is working for you in previous Magento versions, it should still work as well as it had (and as well as 2.1.8 does). Furthermore, the use of iterators, although much more logically sound, appears to have had some negative effects on the overall performance of the indexers for large catalogs in 2.1.8. I don't believe, based on a really cursory overview, that that issue is insurmountable, but I can say that our installs are not going to be upgraded to 2.1.8 for the time being in part because of this. Ultimately, I will be very happy when this workaround module, @silarn 's module, and other workarounds are not necessary AND Magento's core fixes the issues in a way that remains performant, but this is the issue we've all run into on this platform repeatedly... rapid development cycles and aggressive goals have definitely made it clear this isn't the old Magento we knew, sitting years idle before issues are addressed... at the cost of introducing or revealing bugs in minor point releases. But that's all opinion ;-) Factually, I'd recommend building a test instance of your install, and verifying how your catalog displays in 2.1.8 with or without the workaround module before making any production changes or upgrading. I can't personally guarantee that this module fixes a problem or conflicts / doesn't conflict with a particular install, mostly because it's a free workaround provided to help Mage2 admins keep their sites working through the growing pains. If you discover anything relevant to users or potential users of this module, please post back so we can keep the community informed. Thanks!!!

avra911 commented 7 years ago

@bangerkuwranger why not adding <= 2.1.7 to composer dependancy then, something like:

    "require": {
        "php": "~5.5.0|~5.6.0|~7.0.0",
        "magento/product-community-edition": "<=2.1.7"
    },

This will force extra investigations at least :)

bangerkuwranger commented 7 years ago

@avra911 Mostly because the bug affects versions at least as far back as v2.1.3... and I think the Magento dev team has done more than enough 'forcing' to the user and dev community. Yeah, folks should upgrade, if for security patches and nothing else... but most installs are pretty dependent on third-party code and it's typically non-trivial even for patch updates.

bangerkuwranger commented 6 years ago

FWIW, based on activity and anecdotal evidence in the thread that spawned this effort, it appears that even 2.2.x AND 2.3.x STILL(!!!) contain some form of this bug. I haven't tested this out with either of those point updates, but there's little reason to believe that there's any harm done by testing this module on those environments if you are having this issue. Not sure it will resolve the issue (as there are multiple 'fixes' that can address the bug), but worth knowing. This module doesn't do anything irreversible to your Magento 2 install, just uses an override to change a class's behavior when enabled.

LiamKarlMitchell commented 6 years ago

Can confirm ran into this problem on a 2.2.0 site. This work around appears to have fixed it, nice job.

QuentinFarizon commented 5 years ago

Has anyone tested this fix on latest version (2.2.8 and 2.3.1) ? Is this still needed ?