diff --git a/modules/articoli/plugins/articoli.lotti.php b/modules/articoli/plugins/articoli.lotti.php index 607dc66a2..5ee276c3d 100755 --- a/modules/articoli/plugins/articoli.lotti.php +++ b/modules/articoli/plugins/articoli.lotti.php @@ -246,6 +246,12 @@ $numero = !empty($data[0]['numero_esterno']) ? $data[0]['numero_esterno'] : $data[0]['numero']; + // The localized document type can come back empty when the language + // row is missing, which left the label without any document word. + if (empty($data[0]['tipo_documento'])) { + $data[0]['tipo_documento'] = tr($module); + } + $text = tr('_DOC_ num. _NUM_ del _DATE_', [ '_DOC_' => $data[0]['tipo_documento'], '_NUM_' => $numero, @@ -392,6 +398,12 @@ $numero = !empty($data[0]['numero_esterno']) ? $data[0]['numero_esterno'] : $data[0]['numero']; + // The localized document type can come back empty when the language + // row is missing, which left the label without any document word. + if (empty($data[0]['tipo_documento'])) { + $data[0]['tipo_documento'] = tr($module); + } + $text = tr('_DOC_ num. _NUM_ del _DATE_', [ '_DOC_' => $data[0]['tipo_documento'], '_NUM_' => $numero,