bluevisiontec / GoogleShoppingApi

Magento Module GoogleShoppingApi v2
Open Software License 3.0
69 stars 45 forks source link

Cannot include XXXX #83

Closed pquerner closed 5 years ago

pquerner commented 8 years ago

When trying to convert attribute it applies magic to finding the correct classes and it tries to load it without checking its existense somewhere.

Warning: include(BlueVisionTec/GoogleShoppingApi/Model/Attribute/Description.php): failed to open stream: No such file or directory in xxxx/src/lib/Varien/Autoload.php on line 94

Call Stack:
    0.3255     352592   1. {main}() xxxx/vendor/aoepeople/aoe_scheduler/shell/scheduler.php:0
    0.4879    8178768   2. Aoe_Scheduler_Shell_Scheduler->run() xxxx/vendor/aoepeople/aoe_scheduler/shell/scheduler.php:545
    0.4887    8261552   3. Aoe_Scheduler_Shell_Scheduler->runNowAction() xxxx/vendor/aoepeople/aoe_scheduler/shell/scheduler.php:37
    0.4922    8791840   4. Aoe_Scheduler_Model_Schedule->runNow(???, ???) xxxx/vendor/aoepeople/aoe_scheduler/shell/scheduler.php:210
    0.5695    9917760   5. call_user_func_array(???, ???) xxxx/vendor/aoepeople/aoe_scheduler/app/code/community/Aoe/Scheduler/Model/Schedule.php:213
    0.5695    9918152   6. BlueVisionTec_GoogleShoppingApi_Model_Observer->syncProducts(???) xxxx/vendor/aoepeople/aoe_scheduler/app/code/community/Aoe/Scheduler/Model/Schedule.php:213
    0.6629   12847488   7. BlueVisionTec_GoogleShoppingApi_Model_MassOperations->synchronizeStoreItems(???) xxxx/vendor/bluevisiontec/googleshoppingapi/app/code/community/BlueVisionTec/GoogleShoppingApi/Model/Observer.php:161
    0.6652   12858600   8. BlueVisionTec_GoogleShoppingApi_Model_MassOperations->synchronizeItems(???) xxxx/vendor/bluevisiontec/googleshoppingapi/app/code/community/BlueVisionTec/GoogleShoppingApi/Model/MassOperations.php:324
    5.6070   52532176   9. BlueVisionTec_GoogleShoppingApi_Model_Item->updateItem() xxxx/vendor/bluevisiontec/googleshoppingapi/app/code/community/BlueVisionTec/GoogleShoppingApi/Model/MassOperations.php:157
    5.6075   52577296  10. BlueVisionTec_GoogleShoppingApi_Model_Service_Item->update(???) xxxx/vendor/bluevisiontec/googleshoppingapi/app/code/community/BlueVisionTec/GoogleShoppingApi/Model/Item.php:101
    6.3733   52807088  11. BlueVisionTec_GoogleShoppingApi_Model_Type->convertAttributes(???) xxxx/vendor/bluevisiontec/googleshoppingapi/app/code/community/BlueVisionTec/GoogleShoppingApi/Model/Service/Item.php:64
    6.9156   58087448  12. BlueVisionTec_GoogleShoppingApi_Model_Type->_getBaseAttributes() xxxx/vendor/bluevisiontec/googleshoppingapi/app/code/community/BlueVisionTec/GoogleShoppingApi/Model/Type.php:49
    6.9214   58635176  13. BlueVisionTec_GoogleShoppingApi_Model_Type->_initGroupAttributes(???) xxxx/vendor/bluevisiontec/googleshoppingapi/app/code/community/BlueVisionTec/GoogleShoppingApi/Model/Type.php:119
    7.1626   58662072  14. BlueVisionTec_GoogleShoppingApi_Model_Type->_createAttribute(???) xxxx/vendor/bluevisiontec/googleshoppingapi/app/code/community/BlueVisionTec/GoogleShoppingApi/Model/Type.php:135
    7.1627   58662264  15. Mage::getModel(???, ???) xxxx/vendor/bluevisiontec/googleshoppingapi/app/code/community/BlueVisionTec/GoogleShoppingApi/Model/Type.php:167
    7.1627   58662416  16. Mage_Core_Model_Config->getModelInstance(???, ???) xxxx/src/app/Mage.php:471
    7.1627   58662480  17. class_exists(???) xxxx/src/app/code/core/Mage/Core/Model/Config.php:1352
    7.1627   58662872  18. spl_autoload_call(???) xxxx/src/app/code/core/Mage/Core/Model/Config.php:1352
    7.1627   58662960  19. Varien_Autoload->autoload(???) xxxx/src/app/code/core/Mage/Core/Model/Config.php:0

(example log, happens to more attributes)

pquerner commented 8 years ago

I added a little caching system here, so it wont flood our logs in the meantime. Problem is, you can just ignore the error with the "@" sign in front of getModel($modelName), which in my opinion is not that good of a fix.

Caching: https://github.com/MSCG/GoogleShoppingApi/commit/78a0891580a48b0d81df02573531e6dce0434718