尝试将一些在 Joomla 2.5.14 中运行良好的自定义组件迁移到 Joomla 3.1.5,但是出现一些错误,例如 - 在 Joomla 后端中找不到 404 组件和前端中的其他错误
是否有从 Jooma 2.5 到 3x 系列的迁移指南,需要在自定义组件中进行哪些更改
站点第一个错误的前端部分
Notice: Use of undefined constant DS - assumed 'DS' in forms.php
第二个错误
Warning: require_once(com_formsDScontroller.php) [<a href='function.require-once'>function.require-once</a>]: failed to open stream: No such file or directory in forms.php
第三个错误
Fatal error: require_once() [<a href='function.require'>function.require</a>]: Failed opening required 'com_formsDScontroller.php' (include_path='.;C:\php\pear') in forms.php
一直显示forms.php的所有错误,它是
<?php
defined( '_JEXEC' ) or die( 'Restricted access' );
require_once( JPATH_COMPONENT.DS.'controller.php' );
if ($controller = JRequest::getWord('controller')) {
$path = JPATH_COMPONENT.DS.'controllers'.DS.$controller.'.php';
if (file_exists($path)) {
require_once $path;
} else {
$controller = '';
}
}
$classname = 'FormsController'.$controller;
$controller = new $classname();
$controller->execute( JRequest::getVar( 'layout' ) );
$controller->redirect();
?>