Prestashop Class AuthController 不存在
Prestashop Class AuthController does not exist
我最近将我的 Prestashop 安装移到了新的主机上,该站点正常运行。然而,每次我想修改其中一个 SEO&URL(后台 > 首选项 > SEO & URL > 点击 table 上的 page/url)我总是得到以下错误:
Fatal error: Uncaught exception 'ReflectionException' with message 'Class AuthController_ does not exist' in /path/to/prestashop/folder/classes/Meta.php:71
Stack trace: #0 /path/to/prestashop/folder/classes/Meta.php(71): ReflectionClass->__construct('AuthController_')
#1 /path/to/prestashop/folder/controllers/admin/AdminMetaController.php(229): MetaCore::getPages(true, 'index')
#2 /path/to/prestashop/folder/classes/controller/AdminController.php(1428): AdminMetaControllerCore->renderForm()
#3 /path/to/prestashop/folder/classes/controller/Controller.php(167): AdminControllerCore->initContent()
#4 /path/to/prestashop/folder/classes/Dispatcher.php(349): ControllerCore->run()
#5 /path/to/prestashop/folder/ombroadmin/index.php(50): DispatcherCore->dispatch()
#6 {main} thrown in /path/to/prestashop/folder/classes/Meta.php on line 71
我不知道去哪里 look/start,Meta.php 的第 71 行看起来像这样:
foreach ($files as $file)
{
if ($file != 'index.php' && !in_array(strtolower(str_replace('Controller.php', '', $file)), $exlude_pages))
{
$reflection = new ReflectionClass(str_replace('.php', '', $file)); // #Line 71
$properties = $reflection->getDefaultProperties();
if (isset($properties['php_self']))
$selected_pages[$properties['php_self']] = $properties['php_self'];
else if (preg_match('/^[a-z0-9_.-]*\.php$/i', $file))
$selected_pages[strtolower(str_replace('Controller.php', '', $file))] = strtolower(str_replace('Controller.php', '', $file));
else if (preg_match('/^([a-z0-9_.-]*\/)?[a-z0-9_.-]*\.php$/i', $file))
$selected_pages[strtolower(sprintf(Tools::displayError('%2$s (in %1$s)'), dirname($file), str_replace('Controller.php', '', basename($file))))] = strtolower(str_replace('Controller.php', '', basename($file)));
}
}
检查您在 /controllers/front
确实有 AuthController.php
文件,并将其与原始文件进行比较。
删除文件 /cache/class_index.php
。
我最近将我的 Prestashop 安装移到了新的主机上,该站点正常运行。然而,每次我想修改其中一个 SEO&URL(后台 > 首选项 > SEO & URL > 点击 table 上的 page/url)我总是得到以下错误:
Fatal error: Uncaught exception 'ReflectionException' with message 'Class AuthController_ does not exist' in /path/to/prestashop/folder/classes/Meta.php:71
Stack trace: #0 /path/to/prestashop/folder/classes/Meta.php(71): ReflectionClass->__construct('AuthController_')
#1 /path/to/prestashop/folder/controllers/admin/AdminMetaController.php(229): MetaCore::getPages(true, 'index')
#2 /path/to/prestashop/folder/classes/controller/AdminController.php(1428): AdminMetaControllerCore->renderForm()
#3 /path/to/prestashop/folder/classes/controller/Controller.php(167): AdminControllerCore->initContent()
#4 /path/to/prestashop/folder/classes/Dispatcher.php(349): ControllerCore->run()
#5 /path/to/prestashop/folder/ombroadmin/index.php(50): DispatcherCore->dispatch()
#6 {main} thrown in /path/to/prestashop/folder/classes/Meta.php on line 71
我不知道去哪里 look/start,Meta.php 的第 71 行看起来像这样:
foreach ($files as $file)
{
if ($file != 'index.php' && !in_array(strtolower(str_replace('Controller.php', '', $file)), $exlude_pages))
{
$reflection = new ReflectionClass(str_replace('.php', '', $file)); // #Line 71
$properties = $reflection->getDefaultProperties();
if (isset($properties['php_self']))
$selected_pages[$properties['php_self']] = $properties['php_self'];
else if (preg_match('/^[a-z0-9_.-]*\.php$/i', $file))
$selected_pages[strtolower(str_replace('Controller.php', '', $file))] = strtolower(str_replace('Controller.php', '', $file));
else if (preg_match('/^([a-z0-9_.-]*\/)?[a-z0-9_.-]*\.php$/i', $file))
$selected_pages[strtolower(sprintf(Tools::displayError('%2$s (in %1$s)'), dirname($file), str_replace('Controller.php', '', basename($file))))] = strtolower(str_replace('Controller.php', '', basename($file)));
}
}
检查您在 /controllers/front
确实有 AuthController.php
文件,并将其与原始文件进行比较。
删除文件 /cache/class_index.php
。