Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Magento\Framework\App\ResourceConnection table name altering plugins to di.xml #1326

Closed
wants to merge 1 commit into from

Conversation

Mathiu
Copy link

@Mathiu Mathiu commented Feb 22, 2019

Fixes my particular issue (#1322) on a migrated store from M1 to M2 where price indexes were being retrieved from a wrong database table.

The issue here is that Magento is using 2 plugins for Magento\Framework\App\ResourceConnection class but only on frontend area to alter the name of the "catalog_product_index_price" which is not the case when reindexing data, the scope is then adminhtml.

I think this might also be a Magento core issue, so if that's the case, please let me know.

@Mathiu
Copy link
Author

Mathiu commented Feb 22, 2019

As far as I can see the "get_catalog_product_price_index_table_name" plugin is a part of indexer optimization of magento 2.2.6: magento/magento2@a3de9ab#diff-da4fdd9a985964091b2bbe0a3722ab77 and magento/magento2@412650c#diff-da4fdd9a985964091b2bbe0a3722ab77 and its apparently being enabled for almost every area but adminhtml.

I would appreciate if anyone could look at this and advise if its a Magento core issue or how to fix it for 2.2.5 as well.

Thanks!

@rbayet rbayet requested a review from romainruaud February 25, 2019 11:38
@rbayet
Copy link
Collaborator

rbayet commented Feb 25, 2019

Hello @Mathiu,

Yes, to me, it might be a core issue.
Without an access to MAGETWO-91820, MAGETWO-91873 and MAGETWO-64467, I don't really understand why the plugins are declared everywhere but in adminhtml.
So as it stands, @romainruaud and I have an issue about your fix, because if it is the fix, it should be present in magento/module-catalog.

On the other hand, looking at the rest of the changes in module-catalog/etc/di.xml, the 2 commits you pointed might be a BC in magento we need to address in our module.
We will have a look and may get back to you in the issue #1322.

Regards,

@Mathiu
Copy link
Author

Mathiu commented Feb 25, 2019

@rbayet Awesome, thank you for reviewing this!

@rbayet
Copy link
Collaborator

rbayet commented Feb 26, 2019

Closing this PR as it would not fully address the issue pointed in #1322 : as it stands, ElasticSuite does not support the price index segmentation mode other than none (ie "no segmentation").
See #1322 (comment)

This PR would only work with a website segmentation and would only index valid prices if they do not vary between websites.

@rbayet rbayet closed this Feb 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants