Closed phizab closed 8 years ago
I could not reproduce the bug in Magento 1.9.2.3 with sample data, "Use HTML from Solr Index" = "Yes" and products with different description per store view. I could save the product and reindex from admin without errors. Can you share your module configuration and Magento version?
Your PR seems to make sense, but we need to test it somehow.
I think it has nothing to do with configuration, because method _addResultHtmlToProductData
is called every time a product gets reindexed independent on any setting. It is difficult to see the problem, but there may be some hints.
I saw the problem in my local installation by the following (product is in one website with two stores, locale de_DE and en_US, Magento 1.9.2.3):
Sadly the easiest way to see the problem is to debug method _emulateStore
, when saving a product with two different stores. You will see in line 748 of IntegerNet_Solr_Model_Indexer_Product how _initialEnvironmentInfo
gets rewritten wrong when reaching this method the second time.
So the problem may be invisible for users in admin area, but exists in code and can produce errors like in my installation. I don't know if the solr index is affected of it. I hope this helps you a bit and that you can reproduce the problem.
If I save a product in admin area and the product is in two stores especially with different languages, I've got problems with the store emulation. There is a call to start emulation for each store, but there is only one restoring. So the following happens:
This problem should be fixed with line 421. But the translation is also not restored correctly. So I switched the position of the locale setting in method _emulateStore, because otherwise when starting the emulation, a wrong initial locale would be set.
Can you please check this?