Skip to content

Commit 47912b4

Browse files
author
Stanislav Idolov
committed
MAGETWO-87851: [Forwardport] #13551 Fix json encoded attribute backend type to not encode attribute value multiple times #13640
1 parent 95cdc8b commit 47912b4

File tree

1 file changed

+3
-2
lines changed
  • app/code/Magento/Catalog/Controller/Adminhtml/Product/Attribute

1 file changed

+3
-2
lines changed

app/code/Magento/Catalog/Controller/Adminhtml/Product/Attribute/Save.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,8 +200,6 @@ public function execute()
200200
}
201201
}
202202

203-
$data = $this->presentation->convertPresentationDataToInputType($data);
204-
205203
if ($attributeId) {
206204
if (!$model->getId()) {
207205
$this->messageManager->addErrorMessage(__('This attribute no longer exists.'));
@@ -216,6 +214,7 @@ public function execute()
216214

217215
$data['attribute_code'] = $model->getAttributeCode();
218216
$data['is_user_defined'] = $model->getIsUserDefined();
217+
$data['frontend_input'] = $model->getFrontendInput();
219218
} else {
220219
/**
221220
* @todo add to helper and specify all relations for properties
@@ -228,6 +227,8 @@ public function execute()
228227
);
229228
}
230229

230+
$data = $this->presentation->convertPresentationDataToInputType($data);
231+
231232
$data += ['is_filterable' => 0, 'is_filterable_in_search' => 0];
232233

233234
if ($model->getIsUserDefined() === null || $model->getIsUserDefined() != 0) {

0 commit comments

Comments
 (0)