diff --git a/app/Model/Attribute.php b/app/Model/Attribute.php index 420787544..c9bd4d990 100644 --- a/app/Model/Attribute.php +++ b/app/Model/Attribute.php @@ -3616,7 +3616,11 @@ class Attribute extends AppModel $at['event_id'] = $eventId; $toSave[] = $at; } - $this->AttributeTag->saveMany($toSave, ['validate' => true]); + if (!$this->AttributeTag->saveMany($toSave, ['validate' => true])) { + $this->log("Could not save tags when capturing attribute with ID {$this->id}.", LOG_WARNING); + } else if (!empty($this->AttributeTag->validationErrors)) { + $this->log("Could not save some tags when capturing attribute with ID {$this->id}: " . json_encode($this->AttributeTag->validationErrors), LOG_WARNING); + } } if (isset($attribute['Tag'])) { if (!empty($attribute['Tag']['name'])) { diff --git a/app/Model/Event.php b/app/Model/Event.php index 018e2d01a..31c5b3b1a 100755 --- a/app/Model/Event.php +++ b/app/Model/Event.php @@ -3823,7 +3823,11 @@ class Event extends AppModel $et['event_id'] = $this->id; $toSave[] = $et; } - $this->EventTag->saveMany($toSave, ['validate' => true]); + if (!$this->EventTag->saveMany($toSave, ['validate' => true])) { + $this->log("Could not save tags when capturing event with ID {$this->id}.", LOG_WARNING); + } else if (!empty($this->EventTag->validationErrors)) { + $this->log("Could not save some tags when capturing event with ID {$this->id}: " . json_encode($this->EventTag->validationErrors), LOG_WARNING); + } } $parentEvent = $this->find('first', array( 'conditions' => array('Event.id' => $this->id),