Merge branch 'support/3.2' into develop

# Conflicts:
#	addons/userrights/userrightsprofile.db.class.inc.php
#	addons/userrights/userrightsprojection.class.inc.php
#	datamodels/2.x/combodo-backoffice-darkmoon-theme/scss/scss-variables.scss
This commit is contained in:
Stephen Abello
2025-10-27 16:00:08 +01:00
33 changed files with 319 additions and 179 deletions

View File

@@ -337,7 +337,18 @@ class ObjectFormHandlerHelper
);
}
} else {
throw new HttpException(Response::HTTP_INTERNAL_SERVER_ERROR, implode('<br/>', $aFormData['validation']['messages']['error']['_main']));
$sErrorMessages = '';
foreach ($aFormData['validation']['messages']['error'] as $sFieldId => $aMessages) {
if ($sFieldId == '_main') {
$sErrorMessages .= implode(' - ', $aFormData['validation']['messages']['error']['_main']);
} else {
$oObj = $oFormManager->GetObject();
$sLabel = $oObj->GetLabel($sFieldId);
$sErrorMessages .= Dict::Format('Portal:Error:CheckToWriteFailed', $sLabel, (is_array($aMessages) ? implode(' - ', $aMessages) : $aMessages));
}
}
throw new HttpException(Response::HTTP_INTERNAL_SERVER_ERROR, $sErrorMessages);
}
break;