-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Description
Summary (*)
Since Magento 2.2.x and newer, Magento do not provide a full backtrace for exception. Refer to this ticket #13128
Examples (*)
The issue can be seen whenever an exception happen. I know with xdebug and a test case then developer can get a backtrace on their local environment but in fact, bugs are hard to replicate sometime and when it happens randomly on a production environment, a full backtrace is helpful
Currently all information we get for an exception as below
[2018-01-11 09:29:22] main.CRITICAL: Item (Magento\Catalog\Model\Product\Interceptor) with the same ID "1986" already exists. {"exception":"[object] (Exception(code: 0): Item (Magento\Catalog\Model\Product\Interceptor) with the same ID "1986" already exists. at /home/led/domain.com/vendor/magento/framework/Data/Collection.php:404)"} []
[2018-01-11 09:30:27] main.CRITICAL: Item (Magento\Catalog\Model\Product\Interceptor) with the same ID "1986" already exists. {"exception":"[object] (Exception(code: 0): Item (Magento\Catalog\Model\Product\Interceptor) with the same ID "1986" already exists. at /home/led/domain.com/vendor/magento/framework/Data/Collection.php:404)"} []
[2018-01-11 09:42:29] main.CRITICAL: Item (Magento\Catalog\Model\Product\Interceptor) with the same ID "1986" already exists. {"exception":"[object] (Exception(code: 0): Item (Magento\Catalog\Model\Product\Interceptor) with the same ID "1986" already exists. at /home/led/domain.com/vendor/magento/framework/Data/Collection.php:404)"} []
We expected something as below
Exception #0 (Exception): Item (Magento/CatalogInventory/Model/Stock/Status/Interceptor) with the same ID "98" already exists.
#0 lib/internal/Magento/Framework/Data/AbstractSearchResult.php(233): Magento/Framework/Data/AbstractSearchResult->addItem(Object(Magento/CatalogInventory/Model/Stock/Status/Interceptor))
#1 lib/internal/Magento/Framework/Data/AbstractSearchResult.php(102): Magento/Framework/Data/AbstractSearchResult->load()
#2 app/code/Magento/CatalogInventoryConfigurableProduct/Plugin/GetInStockAttributeOptionsPlugin.php(62): Magento/Framework/Data/AbstractSearchResult->getItems()
#3 lib/internal/Magento/Framework/Interception/Interceptor.php(146): Magento/CatalogInventoryConfigurableProduct/Plugin/GetInStockAttributeOptionsPlugin->afterGetAttributeOptions(Object(Magento/ConfigurableProduct/Model/AttributeOptionProvider/Interceptor), Array, Object(Magento/Catalog/Model/ResourceModel/Eav/Attribute/Interceptor), '128')
..........
..............)
Proposed solution
The issue were explained and proposed a solution here
#13128 (comment)
Please provide Severity assessment for the Issue as Reporter. This information will help during Confirmation and Issue triage processes.
- Severity: S0 - Affects critical data or functionality and leaves users with no workaround.
- Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
- Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
- Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
- Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status