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

Crashed index by deleting old image and uploading new in same process #4

Open
m-overlund opened this issue Apr 5, 2023 · 2 comments

Comments

@m-overlund
Copy link

m-overlund commented Apr 5, 2023

Steps to reproduce:

  1. Create a badge with a image uploaded.
  2. Upload a new image to this badge, and check delete image at the same time.
  3. Reindex

Expected result:

  1. Index is updated

Actual result:

  1. Index does not update and HTTP 500

Info

Seems to crash on the multiselect attribute that the badge rule used.

[05-Apr-2023 07:54:04 UTC] PHP Fatal error:  Uncaught Error: Call to a member function getBackend() on bool in /public_html/app/code/core/Mage/Catalog/Model/Resource/Product/Collection.php:855
Stack trace:
#0 /public_html/app/code/community/CustomGento/ProductBadges/Model/Rule/Condition/Product/BaseCondition.php(78): Mage_Catalog_Model_Resource_Product_Collection->getAllAttributeValues()
#1 /public_html/app/code/core/Mage/CatalogRule/Model/Rule/Condition/Combine.php(63): CustomGento_ProductBadges_Model_Rule_Condition_Product_BaseCondition->collectValidatedAttributes()
#2 /public_html/app/code/community/CustomGento/ProductBadges/Model/BadgeConfig.php(79): Mage_CatalogRule_Model_Rule_Condition_Combine->collectValidatedAttributes()
#3 /public_html/app/code/community/CustomGento/ProductBadges/Model/Scanner/ProductBadges.php(68): CustomGento_ProductBadges_Model_BadgeConfig->getMatchingProductIds()
#4 /public_html/app/code/community/CustomGento/ProductBadges/Model/Resource/Indexer/ProductBadges.php(112): CustomGento_ProductBadges_Model_Scanner_ProductBadges->fetchBadges()
#5 /public_html/app/code/community/CustomGento/ProductBadges/Model/Resource/Indexer/ProductBadges.php(91): CustomGento_ProductBadges_Model_Resource_Indexer_ProductBadges->rebuild()
#6 /public_html/app/code/community/CustomGento/ProductBadges/Model/Resource/Indexer/ProductBadges.php(63): CustomGento_ProductBadges_Model_Resource_Indexer_ProductBadges->rebuild()
#7 /public_html/app/code/core/Mage/Index/Model/Indexer/Abstract.php(145): CustomGento_ProductBadges_Model_Resource_Indexer_ProductBadges->reindexAll()
#8 /public_html/app/code/core/Mage/Index/Model/Process.php(207): Mage_Index_Model_Indexer_Abstract->reindexAll()
#9 /public_html/app/code/core/Mage/Index/Model/Process.php(255): Mage_Index_Model_Process->reindexAll()
#10 /public_html/app/code/core/Mage/Index/controllers/Adminhtml/ProcessController.php(189): Mage_Index_Model_Process->reindexEverything()
#11 /public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(428): Mage_Index_Adminhtml_ProcessController->massReindexAction()
#12 /public_html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(262): Mage_Core_Controller_Varien_Action->dispatch()
#13 /public_html/app/code/core/Mage/Core/Controller/Varien/Front.php(188): Mage_Core_Controller_Varien_Router_Standard->match()
#14 /public_html/app/code/core/Mage/Core/Model/App.php(371): Mage_Core_Controller_Varien_Front->dispatch()
#15 /public_html/app/Mage.php(735): Mage_Core_Model_App->run()
#16 /public_html/index.php(165): Mage::run()
#17 {main}
  thrown in /public_html/app/code/core/Mage/Catalog/Model/Resource/Product/Collection.php on line 855
@sprankhub
Copy link
Member

Thanks for reporting. Honestly, I am not sure if / when we would be able to check as M1 is not our focus anymore. Would you be willing to provide a PR? Happy to review it then.

/cc @ceckoslab

@m-overlund
Copy link
Author

Ended up truncating the database tables, and got around the issue.
I'm not able to provide a PR - I do not know how to, sorry.

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

No branches or pull requests

2 participants