@@ -227,13 +227,14 @@ private function getField(string $sectionId, string $groupId, string $fieldId):
227
227
* Get field path
228
228
*
229
229
* @param Field $field
230
+ * @param string $fieldId Need for support of clone_field feature
230
231
* @param array &$oldConfig Need for compatibility with _processGroup()
231
232
* @param array &$extraOldGroups Need for compatibility with _processGroup()
232
233
* @return string
233
234
*/
234
- private function getFieldPath (Field $ field , array &$ oldConfig , array &$ extraOldGroups ): string
235
+ private function getFieldPath (Field $ field , string $ fieldId , array &$ oldConfig , array &$ extraOldGroups ): string
235
236
{
236
- $ path = $ field ->getGroupPath () . '/ ' . $ field -> getId () ;
237
+ $ path = $ field ->getGroupPath () . '/ ' . $ fieldId ;
237
238
238
239
/**
239
240
* Look for custom defined field path
@@ -293,7 +294,7 @@ private function getChangedPaths(
293
294
if (isset ($ groupData ['fields ' ])) {
294
295
foreach ($ groupData ['fields ' ] as $ fieldId => $ fieldData ) {
295
296
$ field = $ this ->getField ($ sectionId , $ groupId , $ fieldId );
296
- $ path = $ this ->getFieldPath ($ field , $ oldConfig , $ extraOldGroups );
297
+ $ path = $ this ->getFieldPath ($ field , $ fieldId , $ oldConfig , $ extraOldGroups );
297
298
if ($ this ->isValueChanged ($ oldConfig , $ path , $ fieldData )) {
298
299
$ changedPaths [] = $ path ;
299
300
}
@@ -374,7 +375,7 @@ protected function _processGroup(
374
375
$ backendModel ->addData ($ data );
375
376
$ this ->_checkSingleStoreMode ($ field , $ backendModel );
376
377
377
- $ path = $ this ->getFieldPath ($ field , $ extraOldGroups , $ oldConfig );
378
+ $ path = $ this ->getFieldPath ($ field , $ fieldId , $ extraOldGroups , $ oldConfig );
378
379
$ backendModel ->setPath ($ path )->setValue ($ fieldData ['value ' ]);
379
380
380
381
$ inherit = !empty ($ fieldData ['inherit ' ]);
@@ -580,4 +581,4 @@ public function getConfigDataValue($path, &$inherit = null, $configData = null)
580
581
581
582
return $ data ;
582
583
}
583
- }
584
+ }
0 commit comments