Skip to content

Commit e250cbf

Browse files
committed
MAGETWO-95140: Placeholder image does not display on Storefront products
1 parent 840a7aa commit e250cbf

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

app/code/Magento/Config/Model/Config.php

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212

1313
/**
1414
* Backend config model
15-
* Used to save configuration
1615
*
16+
* Used to save configuration
1717
* @author Magento Core Team <core@magentocommerce.com>
1818
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
1919
* @api
@@ -122,6 +122,7 @@ public function __construct(
122122

123123
/**
124124
* Save config section
125+
*
125126
* Require set: section, website, store and groups
126127
*
127128
* @throws \Exception
@@ -237,13 +238,14 @@ private function getField(string $sectionId, string $groupId, string $fieldId):
237238
* Get field path
238239
*
239240
* @param Field $field
241+
* @param string $fieldId
240242
* @param array &$oldConfig Need for compatibility with _processGroup()
241243
* @param array &$extraOldGroups Need for compatibility with _processGroup()
242244
* @return string
243245
*/
244-
private function getFieldPath(Field $field, array &$oldConfig, array &$extraOldGroups): string
246+
private function getFieldPath(Field $field, string $fieldId, array &$oldConfig, array &$extraOldGroups): string
245247
{
246-
$path = $field->getGroupPath() . '/' . $field->getId();
248+
$path = $field->getGroupPath() . '/' . $fieldId;
247249

248250
/**
249251
* Look for custom defined field path
@@ -303,7 +305,7 @@ private function getChangedPaths(
303305
if (isset($groupData['fields'])) {
304306
foreach ($groupData['fields'] as $fieldId => $fieldData) {
305307
$field = $this->getField($sectionId, $groupId, $fieldId);
306-
$path = $this->getFieldPath($field, $oldConfig, $extraOldGroups);
308+
$path = $this->getFieldPath($field, $fieldId, $oldConfig, $extraOldGroups);
307309
if ($this->isValueChanged($oldConfig, $path, $fieldData)) {
308310
$changedPaths[] = $path;
309311
}
@@ -398,7 +400,7 @@ protected function _processGroup(
398400
$backendModel->addData($data);
399401
$this->_checkSingleStoreMode($field, $backendModel);
400402

401-
$path = $this->getFieldPath($field, $extraOldGroups, $oldConfig);
403+
$path = $this->getFieldPath($field, $fieldId, $extraOldGroups, $oldConfig);
402404
$backendModel->setPath($path)->setValue($fieldData['value']);
403405

404406
$inherit = !empty($fieldData['inherit']);
@@ -504,6 +506,7 @@ public function setDataByPath($path, $value)
504506

505507
/**
506508
* Get scope name and scopeId
509+
*
507510
* @todo refactor to scope resolver
508511
* @return void
509512
*/

0 commit comments

Comments
 (0)