diff --git a/htdocs/core/class/html.formwebsite.class.php b/htdocs/core/class/html.formwebsite.class.php
index 5d553887777..a4db07f95c0 100644
--- a/htdocs/core/class/html.formwebsite.class.php
+++ b/htdocs/core/class/html.formwebsite.class.php
@@ -173,7 +173,7 @@ class FormWebsite
$langs->load("admin");
- $listofsamples = dol_dir_list(DOL_DOCUMENT_ROOT.($conf->entity > 1 ? '/'.$conf->entity : '').'/website/samples', 'files', 0, '^page-sample-.*\.html$');
+ $listofsamples = dol_dir_list(DOL_DOCUMENT_ROOT.'/website/samples', 'files', 0, '^page-sample-.*\.html$');
$arrayofsamples = array();
$arrayofsamples['empty'] = 'EmptyPage'; // Always this one first
diff --git a/htdocs/core/lib/website.lib.php b/htdocs/core/lib/website.lib.php
index eeb68458252..87608d81118 100644
--- a/htdocs/core/lib/website.lib.php
+++ b/htdocs/core/lib/website.lib.php
@@ -495,7 +495,7 @@ function includeContainer($containerref)
$containerref .= '.php';
}
- $fullpathfile = DOL_DATA_ROOT.($conf->entity > 1 ? '/'.$conf->entity.'/' : '').'/website/'.$websitekey.'/'.$containerref;
+ $fullpathfile = DOL_DATA_ROOT.($conf->entity > 1 ? '/'.$conf->entity : '').'/website/'.$websitekey.'/'.$containerref;
if (empty($includehtmlcontentopened)) {
$includehtmlcontentopened = 0;
@@ -984,7 +984,7 @@ function getPagesFromSearchCriterias($type, $algo, $searchstring, $max = 25, $so
if (!$error && (empty($max) || ($found < $max)) && (preg_match('/sitefiles/', $algo))) {
global $dolibarr_main_data_root;
- $pathofwebsite = $dolibarr_main_data_root.($conf->entity > 1 ? '/'.$conf->entity.'/' : '').'/website/'.$website->ref;
+ $pathofwebsite = $dolibarr_main_data_root.($conf->entity > 1 ? '/'.$conf->entity : '').'/website/'.$website->ref;
$filehtmlheader = $pathofwebsite.'/htmlheader.html';
$filecss = $pathofwebsite.'/styles.css.php';
$filejs = $pathofwebsite.'/javascript.js.php';