@@ -227,13 +227,14 @@ private function getField(string $sectionId, string $groupId, string $fieldId):
227227 * Get field path
228228 *
229229 * @param Field $field
230+ * @param string $fieldId Need for support of clone_field feature
230231 * @param array &$oldConfig Need for compatibility with _processGroup()
231232 * @param array &$extraOldGroups Need for compatibility with _processGroup()
232233 * @return string
233234 */
234- private function getFieldPath (Field $ field , array &$ oldConfig , array &$ extraOldGroups ): string
235+ private function getFieldPath (Field $ field , string $ fieldId , array &$ oldConfig , array &$ extraOldGroups ): string
235236 {
236- $ path = $ field ->getGroupPath () . '/ ' . $ field -> getId () ;
237+ $ path = $ field ->getGroupPath () . '/ ' . $ fieldId ;
237238
238239 /**
239240 * Look for custom defined field path
@@ -293,7 +294,7 @@ private function getChangedPaths(
293294 if (isset ($ groupData ['fields ' ])) {
294295 foreach ($ groupData ['fields ' ] as $ fieldId => $ fieldData ) {
295296 $ field = $ this ->getField ($ sectionId , $ groupId , $ fieldId );
296- $ path = $ this ->getFieldPath ($ field , $ oldConfig , $ extraOldGroups );
297+ $ path = $ this ->getFieldPath ($ field , $ fieldId , $ oldConfig , $ extraOldGroups );
297298 if ($ this ->isValueChanged ($ oldConfig , $ path , $ fieldData )) {
298299 $ changedPaths [] = $ path ;
299300 }
@@ -374,7 +375,7 @@ protected function _processGroup(
374375 $ backendModel ->addData ($ data );
375376 $ this ->_checkSingleStoreMode ($ field , $ backendModel );
376377
377- $ path = $ this ->getFieldPath ($ field , $ extraOldGroups , $ oldConfig );
378+ $ path = $ this ->getFieldPath ($ field , $ fieldId , $ extraOldGroups , $ oldConfig );
378379 $ backendModel ->setPath ($ path )->setValue ($ fieldData ['value ' ]);
379380
380381 $ inherit = !empty ($ fieldData ['inherit ' ]);
@@ -580,4 +581,4 @@ public function getConfigDataValue($path, &$inherit = null, $configData = null)
580581
581582 return $ data ;
582583 }
583- }
584+ }
0 commit comments