-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Closed
Closed
Copy link
Description
Reopening #6465
Preconditions
- Magento 2.1.4
Steps to reproduce
- Add an attribute to Customer and use it in grid, e.g.:
$this->eavSetup->addAttribute(
Customer::ENTITY,
'some_value',
[
'label' => 'Some value',
'type' => 'varchar',
'input' => 'text',
'position' => 105,
'sort_order' => 105,
'visible' => true,
'required' => false,
'system' => false,
'is_used_in_grid' => true,
]
);
- Forget (hey, everybody's got to learn) to add the attribute to the indexer
- Add/save a new Customer
Expected result
- The SQL error of the missing field in the
customer_grid_flat
table. Or maybe an Exception that let's me know that I intend to use a certain attribute in a grid but I forgot to add XML-configuration (etc/indexer.xml) for the indexer.
The main problem is that the rollback failed, so a Customer was added to the DB but an Exception was still thrown which replaced the actual SQL error, impeding debugging.
Actual result
- The method
Magento\Customer\Model\Plugin\CustomerRepository\TransactionWrapper::aroundSave
throws an Exception with a clear SQL error, however$this->resourceModel->rollBack()
throws an Exception with the message "Asymmetric transaction rollback". I couldn't find out why.
So the real problem is that transaction rollback is overtrowing the ACTUAL error, making debugging near impossible.
Metadata
Metadata
Assignees
Labels
No labels