diff --git a/htdocs/langs/en_US/errors.lang b/htdocs/langs/en_US/errors.lang index 8689be74db3..467e782cb15 100644 --- a/htdocs/langs/en_US/errors.lang +++ b/htdocs/langs/en_US/errors.lang @@ -318,6 +318,7 @@ ErrorTheUrlOfYourDolInstanceDoesNotMatchURLIntoOAuthSetup=Error: The URL of you ErrorMenuExistValue=A Menu already exist with this Title or URL ErrorSVGFilesNotAllowedAsLinksWithout=SVG files are not allowed as external links without the option %s ErrorTypeMenu=Impossible to add another menu for the same module on the navbar, not handle yet +ErrorFailedToCreateSymLinkToMedias=Failed to create the symlinks %s to point to %s # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup. diff --git a/htdocs/website/index.php b/htdocs/website/index.php index 04f3b06edfa..8fcb0de3f15 100644 --- a/htdocs/website/index.php +++ b/htdocs/website/index.php @@ -2384,7 +2384,8 @@ if ($action == 'regeneratesite' && $usercanedit) { dol_mkdir(dirname($pathtomediasinwebsite)); // To be sure that the directory for website exists $result = symlink($pathtomedias, $pathtomediasinwebsite); if (!$result) { - setEventMessages($langs->trans("ErrorFieldToCreateSymLinkToMedias", $pathtomediasinwebsite, $pathtomedias), null, 'errors'); + $langs->load("errors"); + setEventMessages($langs->trans("ErrorFailedToCreateSymLinkToMedias", $pathtomediasinwebsite, $pathtomedias), null, 'errors'); $action = 'preview'; } } @@ -2421,7 +2422,8 @@ if ($action == 'importsiteconfirm' && $usercanedit) { dol_mkdir(dirname($pathtomediasinwebsite)); // To be sure dir for website exists $result = symlink($pathtomedias, $pathtomediasinwebsite); if (!$result) { - setEventMessages($langs->trans("ErrorFieldToCreateSymLinkToMedias", $pathtomediasinwebsite, $pathtomedias), null, 'errors'); + $langs->load("errors"); + setEventMessages($langs->trans("ErrorFailedToCreateSymLinkToMedias", $pathtomediasinwebsite, $pathtomedias), null, 'errors'); $action = 'importsite'; } }