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

Some bug in $product->load($id) method for some products #2800

Closed
mantonuk opened this issue Dec 23, 2015 · 3 comments
Closed

Some bug in $product->load($id) method for some products #2800

mantonuk opened this issue Dec 23, 2015 · 3 comments
Assignees
Labels
bug report Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development

Comments

@mantonuk
Copy link

yoyo
The users can get error if store have attribute of product like 'stock_status'
"mysql> select * from eav_attribute where attribute_id = 364;
+--------------+----------------+----------------+-----------------+---------------+--------------+---------------+----------------+----------------+----------------+----------------+-----------------------------------+-------------+-----------------+---------------+-----------+------+
| attribute_id | entity_type_id | attribute_code | attribute_model | backend_model | backend_type | backend_table | frontend_model | frontend_input | frontend_label | frontend_class | source_model | is_required | is_user_defined | default_value | is_unique | note |
+--------------+----------------+----------------+-----------------+---------------+--------------+---------------+----------------+----------------+----------------+----------------+-----------------------------------+-------------+-----------------+---------------+-----------+------+
| 364 | 4 | stock_status | NULL | NULL | int | NULL | NULL | select | Stock Options | NULL | eav/entity_attribute_source_table | 0 | 1 | | 0 | |
+--------------+----------------+----------------+-----------------+---------------+--------------+---------------+----------------+----------------+----------------+----------------+-----------------------------------+-------------+-----------------+---------------+-----------+------+
1 row in set (0.00 sec)"

@mantonuk
Copy link
Author

var_dump($stockStatus); == option_id of dropdown

main.CRITICAL: exception 'Exception' with message 'Notice: Undefined variable: status in ---vendor/magento/module-catalog-inventory/Helper/Stock.php on line 86' in ---vendor/magento/framework/App/ErrorHandler.php:61
Stack trace:
#0 ---vendor/magento/module-catalog-inventory/Helper/Stock.php(86): Magento\Framework\App\ErrorHandler->handler(8, 'Undefined varia...', '/chroot/home/po...', 86, Array)
#1 ---vendor/magento/module-catalog-inventory/Observer/AddInventoryDataObserver.php(40): Magento\CatalogInventory\Helper\Stock->assignStatusToProduct(Object(Magento\Catalog\Model\Product\Interceptor), '3676')
#2 ---vendor/magento/framework/Event/Invoker/InvokerDefault.php(73): Magento\CatalogInventory\Observer\AddInventoryDataObserver->execute(Object(Magento\Framework\Event\Observer))
#3 ---vendor/magento/framework/Event/Invoker/InvokerDefault.php(61): Magento\Framework\Event\Invoker\InvokerDefault->_callObserverMethod(Object(Magento\CatalogInventory\Observer\AddInventoryDataObserver), Object(Magento\Framework\Event\Observer))
#4 ---vendor/magento/framework/Event/Manager.php(65): Magento\Framework\Event\Invoker\InvokerDefault->dispatch(Array, Object(Magento\Framework\Event\Observer))
#5 ---var/generation/Magento/Framework/Event/Manager/Proxy.php(95): Magento\Framework\Event\Manager->dispatch('catalog_product...', Array)
#6 ---vendor/magento/framework/Model/AbstractModel.php(561): Magento\Framework\Event\Manager\Proxy->dispatch('catalog_product...', Array)

@le0n4eg
Copy link
Contributor

le0n4eg commented Dec 28, 2015

Thanks for reporting this issue! Internal ticket MAGETWO-47431

@vkholoshenko vkholoshenko added Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development bug report labels Dec 29, 2015
@mslabko
Copy link
Member

mslabko commented Jan 25, 2016

Hi @mantonuk,
the issue was fixed in a831bd1
Thank you for reporting.

@mslabko mslabko closed this as completed Jan 25, 2016
magento-engcom-team pushed a commit that referenced this issue Jul 4, 2018
[TSG] Upporting for 2.3 (pr27) (2.3.0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development
Projects
None yet
Development

No branches or pull requests

6 participants