diff --git a/src/Controller/Component/CRUDComponent.php b/src/Controller/Component/CRUDComponent.php index 93419f0..f6adb68 100644 --- a/src/Controller/Component/CRUDComponent.php +++ b/src/Controller/Component/CRUDComponent.php @@ -252,7 +252,8 @@ class CRUDComponent extends Component $query->innerJoinWith('MetaTemplateFields', function ($q) { return $q->contain('MetaFields')->innerJoinWith('MetaFields'); }); - $query->group(['MetaTemplates.id'])->order(['MetaTemplates.is_default' => 'DESC']); + $query->group(['MetaTemplates.id', 'MetaTemplates.scope', 'MetaTemplates.name', 'MetaTemplates.namespace', 'MetaTemplates.description', 'MetaTemplates.version', 'MetaTemplates.uuid', 'MetaTemplates.source', 'MetaTemplates.enabled', 'MetaTemplates.is_default']) + ->order(['MetaTemplates.is_default' => 'DESC']); $metaTemplates = $query->all(); $data['metaTemplates'] = $metaTemplates; return $data;