Skip to content

Commit fbb8687

Browse files
Andrei MaletsAndrei_Malets
authored andcommitted
MAGETWO-70741: An error occurs on attempt to add related product to configurable one
1 parent 495d0c4 commit fbb8687

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

app/code/Magento/Eav/Model/Entity/AttributeLoader.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@ public function loadAllAttributes(AbstractEntity $resource, DataObject $object =
6363
* Check and init default attributes
6464
*/
6565
$defaultAttributesCodes = array_diff($resource->getDefaultAttributes(), $attributeCodes);
66+
67+
$resource->unsetAttributes();
68+
6669
foreach ($defaultAttributesCodes as $attributeCode) {
6770
$resource->addAttribute($this->_getDefaultAttribute($resource, $attributeCode));
6871
}

dev/tests/integration/testsuite/Magento/Catalog/Controller/Adminhtml/CategoryTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ public function testSaveActionCategoryWithDangerRequest()
339339
);
340340
$this->dispatch('backend/catalog/category/save');
341341
$this->assertSessionMessages(
342-
$this->equalTo(['The value of attribute "is_active" must be set']),
342+
$this->equalTo(['The value of attribute "name" must be set']),
343343
\Magento\Framework\Message\MessageInterface::TYPE_ERROR
344344
);
345345
}

0 commit comments

Comments
 (0)