jeżeli w panelu administracyjnym w trybie debugowania napotkasz błąd tego typu:
Warning w linii 2315 w pliku /home/domains/public_html/classes/module/Module.php
[2] file_exists(): open_basedir restriction in effect. File(/views/templates/hook/HookDashboardZoneTwo.tpl) is not within the allowed path(s): (/home/:/tmp/:/var/tmp/:/opt/alt/php74/usr/share/pear/:/dev/urandom:/usr/local/php74/lib/:/usr/local/php74/lib/:/usr/local/php82/lib/:/usr/local/php80/lib/:/usr/local/php81/lib/:/usr/local/lib/php/)
aby naprawić błąd edytuj plik: classes/module/Module.php
zmieniając kod:
protected function getCurrentSubTemplate($template, $cache_id = null, $compile_id = null)
{
if ($compile_id === null) {
$compile_id = $this->getDefaultCompileId();
}
if (!isset($this->current_subtemplate[$template . '_' . $cache_id . '_' . $compile_id])) {
if (false === strpos($template, 'module:') &&
!file_exists(_PS_ROOT_DIR_ . '/' . $template) &&
!file_exists($template)
) {
$template = $this->getTemplatePath($template);
}
$this->current_subtemplate[$template . '_' . $cache_id . '_' . $compile_id] = $this->context->smarty->createTemplate(
$template,
$cache_id,
$compile_id,
$this->smarty
);
}
return $this->current_subtemplate[$template . '_' . $cache_id . '_' . $compile_id];
}
na kod:
protected function getCurrentSubTemplate($template, $cache_id = null, $compile_id = null)
{
if ($compile_id === null) {
$compile_id = $this->getDefaultCompileId();
}
if (!isset($this->current_subtemplate[$template . '_' . $cache_id . '_' . $compile_id])) {
if (false === strpos($template, 'module:') &&
!file_exists(_PS_ROOT_DIR_ . '/' . $template) &&
!file_exists(_PS_ROOT_DIR_ . $template)
) {
$template = $this->getTemplatePath($template);
}
$this->current_subtemplate[$template . '_' . $cache_id . '_' . $compile_id] = $this->context->smarty->createTemplate(
$template,
$cache_id,
$compile_id,
$this->smarty
);
}
return $this->current_subtemplate[$template . '_' . $cache_id . '_' . $compile_id];
}
wgrywamy plik po czym kasujemy pliki tymczasowe.
PrestaShop Polska pomoc: