diff --git a/modules/backend/behaviors/RelationController.php b/modules/backend/behaviors/RelationController.php index e9431dbe7..f948e3e0e 100644 --- a/modules/backend/behaviors/RelationController.php +++ b/modules/backend/behaviors/RelationController.php @@ -688,7 +688,8 @@ class RelationController extends ControllerBehavior if ($this->viewMode == 'single') { $config->showCheckboxes = false; $config->recordOnClick = sprintf( - "$.oc.relationBehavior.clickManageListRecord(:id, '%s', '%s')", + "$.oc.relationBehavior.clickManageListRecord(:%s, '%s', '%s')", + $this->relationModel->getKeyName(), $this->field, $this->relationGetSessionKey() ); @@ -698,7 +699,8 @@ class RelationController extends ControllerBehavior } elseif ($isPivot) { $config->recordOnClick = sprintf( - "$.oc.relationBehavior.clickManagePivotListRecord(:id, '%s', '%s')", + "$.oc.relationBehavior.clickManagePivotListRecord(:%s, '%s', '%s')", + $this->relationModel->getKeyName(), $this->field, $this->relationGetSessionKey() );