fix: [meta template] fixes
parent
8bc3088e12
commit
94bfafb743
|
@ -413,7 +413,6 @@ class CRUDComponent extends Component
|
|||
$metaFieldsTable->patchEntity($entity->meta_fields[$index], [
|
||||
'value' => $new_value, 'meta_template_field_id' => $rawMetaTemplateField->id
|
||||
], ['value']);
|
||||
debug($entity);
|
||||
$metaFieldsTable->patchEntity(
|
||||
$entity->MetaTemplates[$template_id]->meta_template_fields[$meta_template_field_id]->metaFields[$meta_field_id],
|
||||
['value' => $new_value, 'meta_template_field_id' => $rawMetaTemplateField->id],
|
||||
|
@ -643,9 +642,6 @@ class CRUDComponent extends Component
|
|||
$metaTemplates[$metaTemplate->id]->meta_template_fields[$j]['metaFields'] = [];
|
||||
}
|
||||
}
|
||||
if (!empty($metaTemplates[$metaTemplate->id]->meta_template_fields)) {
|
||||
$metaTemplates[$metaTemplate->id]->meta_template_fields = array_values($metaTemplates[$metaTemplate->id]->meta_template_fields);
|
||||
}
|
||||
} else {
|
||||
if (!empty($pruneEmptyDisabled) && !$metaTemplate->enabled) {
|
||||
unset($metaTemplates[$i]);
|
||||
|
|
|
@ -45,7 +45,7 @@ class AppModel extends Entity
|
|||
if ($field['counter'] > 0) {
|
||||
foreach ($field['metaFields'] as $metaField) {
|
||||
if (!empty($this->meta_fields[$template['name']][$field['field']])) {
|
||||
if (!is_array($this->meta_fields[$template['name']])) {
|
||||
if (!is_array($this->meta_fields[$template['name']][$field['field']])) {
|
||||
$this->meta_fields[$template['name']][$field['field']] = [$this->meta_fields[$template['name']][$field['field']]];
|
||||
}
|
||||
$this->meta_fields[$template['name']][$field['field']][] = $metaField['value'];
|
||||
|
|
Loading…
Reference in New Issue