Fix category position migrator visibility join for CE/Mage-OS#3837
Fix category position migrator visibility join for CE/Mage-OS#3837mrrobot-magedev wants to merge 7 commits intoSmile-SA:2.11.xfrom
Conversation
|
Hi, thanks for this PR but we should rather write something that would support both cases, as we do in our indexers, eg, here : https://github.com/Smile-SA/elasticsuite/blob/2.11.x/src/module-elasticsuite-catalog/Model/ResourceModel/Product/Indexer/Fulltext/Datasource/AttributeData.php#L211 |
|
Thanks for the review. You're right — hardcoding I've updated the implementation to follow the same approach as in the indexers by resolving the product link field dynamically using This ensures compatibility for both:
Please let me know if anything else should be improved. |
|
Looks good to me, you can add a PHPMD ignore for the coupling so that the Code Quality check will be OK, but other than that, we'll have someone in the team to test it on both Magento Open Source and Adobe Commerce, and we should be ok. Thanks for submitting the issue but more than that, for contributing a fix, we always appreciate ! |
|
@romainruaud, I've tested this fix on both OS and EE versions of Magento. m247p8ce: Details$ php bin/magento elasticsuite:category-position:migrate --category 6 Transfer negative positions to positive and contiguous ones (y/n) y Transfer zero positions? (y/n) y m248p3ee: Details$ php bin/magento elasticsuite:category-position:migrate --category 6 Transfer negative positions to positive and contiguous ones (y/n) n Transfer zero positions? (y/n) y Therefore, it looks good to me too. @mrrobot-magedev, thanks for spotting that! BR, |
|
Hello @mrrobot-magedev, Would you be so kind to squash all your commits into the first one using a Regards |
OK, nevermind, I saw that the PR was based on top of branch 2.11.x so I created a version on top of branch 2.10.x (#3838) and squashed the commits there. #3838 will replace this one. Regards, |
Description
This PR fixes the visibility join in
CategoryPositionMigrator.The current query joins
catalog_product_entity_intusing:However, in Magento Open Source / Mage-OS CE, product EAV backend tables use
entity_id, notrow_id.This causes the category position migration command to fail on CE/Mage-OS installations because the column
catalog_product_entity_int.row_iddoes not exist.Fix
Replaced:
with:
Steps to reproduce
2.11.xon Magento Open Source / Mage-OS CE.row_idcolumn incatalog_product_entity_int.Expected result
Migration runs successfully and product visibility is correctly joined.
Type of change
Notes
This change ensures compatibility with Magento Open Source / Mage-OS CE environments.