diff --git a/application/Espo/Modules/Crm/Business/Event/Invitations.php b/application/Espo/Modules/Crm/Business/Event/Invitations.php
index fddc7b637a..6b93452157 100644
--- a/application/Espo/Modules/Crm/Business/Event/Invitations.php
+++ b/application/Espo/Modules/Crm/Business/Event/Invitations.php
@@ -75,17 +75,26 @@ class Invitations
$key = '{'.$field.'}';
switch ($d['type']) {
case 'datetime':
- $contents = str_replace($key, $this->dateTime->convertSystemDateTime($entity->get($field)), $contents);
+ $value = $entity->get($field);
+ if ($value) {
+ $contents = str_replace($key, $this->dateTime->convertSystemDateTime($value), $contents);
+ }
break;
case 'date':
- $contents = str_replace($key, $this->dateTime->convertSystemDate($entity->get($field)), $contents);
+ $value = $entity->get($field);
+ if ($value) {
+ $contents = str_replace($key, $this->dateTime->convertSystemDate($value), $contents);
+ }
break;
case 'jsonArray':
break;
case 'jsonObject':
break;
default:
- $contents = str_replace($key, $entity->get($field), $contents);
+ $value = $entity->get($field);
+ if (is_string($value) || $value === null || is_scalar($value) || is_callable([$value, '__toString'])) {
+ $contents = str_replace($key, $value, $contents);
+ }
}
}
diff --git a/application/Espo/Services/EmailTemplate.php b/application/Espo/Services/EmailTemplate.php
index a325defb69..87958c7e02 100644
--- a/application/Espo/Services/EmailTemplate.php
+++ b/application/Espo/Services/EmailTemplate.php
@@ -192,7 +192,9 @@ class EmailTemplate extends Record
$value = $this->getDateTime()->convertSystemDateTime($value);
}
}
- $text = str_replace('{' . $type . '.' . $field . '}', $value, $text);
+ if (is_string($value) || $value === null || is_scalar($value) || is_callable([$value, '__toString'])) {
+ $text = str_replace('{' . $type . '.' . $field . '}', $value, $text);
+ }
}
return $text;
}
diff --git a/client/res/templates/fields/url/list.tpl b/client/res/templates/fields/url/list.tpl
index c8081c3882..958faebb64 100644
--- a/client/res/templates/fields/url/list.tpl
+++ b/client/res/templates/fields/url/list.tpl
@@ -1,3 +1,3 @@
{{#if value}}
- {{value}}
+ {{value}}
{{/if}}
diff --git a/frontend/less/espo/custom.less b/frontend/less/espo/custom.less
index f9d62a15f6..8ca908ce4a 100644
--- a/frontend/less/espo/custom.less
+++ b/frontend/less/espo/custom.less
@@ -275,6 +275,11 @@ ul.dropdown-menu > li.checkbox:last-child {
margin: 0 20px;
}
+.cell > .field {
+ overflow-wrap: break-word;
+ word-wrap: break-word;
+}
+
.field .row {
margin-left: -5px !important;
margin-right: -5px !important;