Debugging Joomla的状态为200,但黑屏无错误
当我设定:Debugging Joomla的状态为200,但黑屏无错误,debugging,joomla,Debugging,Joomla,当我设定: error_reporting(E_ALL); ini_set('display_errors', '1'); 数以百计的警告和严格的消息,但没有错误,它在本地工作,但不在现场。当我发出GET请求时,它可以工作,但相同的url发送POST请求不起作用 我认为这是一些插件造成的,但当Joomla愉快地给我一个有200条回复的空白页面时,很难找到答案 在firebug中,我看不到响应,它只给了我: 重新加载页面以获取以下内容的源:url 这在/components/com_doctri
error_reporting(E_ALL);
ini_set('display_errors', '1');
数以百计的警告和严格的消息,但没有错误,它在本地工作,但不在现场。当我发出GET请求时,它可以工作,但相同的url发送POST请求不起作用
我认为这是一些插件造成的,但当Joomla愉快地给我一个有200条回复的空白页面时,很难找到答案
在firebug中,我看不到响应,它只给了我:
重新加载页面以获取以下内容的源:url
这在/components/com_doctrine/doctrine.php中
$route=JRequest::getVar('router', 'Tournament');
$controllerName = 'doctrineController'.$route;
include_once(dirname(__FILE__) . '/controllers/'.$route.".php");
$controller = new $controllerName(JRequest::getVar('task', ''));
$controller->setEntityManager(bootstrapDoctrine());
//echo "something";die(0); will show here but not after the next line
// and only when I post values not on a get request
$controller->execute(JRequest::getVar('task', ''));
$controller->redirect();
在控制器中,我有:
//JoomlaDoctrineBootstrapper extends JController
class doctrineControllerTournament extends JoomlaDoctrineBootstrapper{
function __construct()
{
parent::__construct();
$this->registerTask( 'show','show' );
$this->registerTask( 'save','save' );
}
function show(){
echo "works only on get requests, not on post";
$model=$this->getModel('tournament');
$view = $this->getView('show','text');
$view->setLayout('default');
$model->em=$this->getEntityManager();
$view->data = $model->getTournamentAsJson();
$view->display();
}
看起来像是一个插件搞乱了我的帖子请求,但不知道在哪里可以找到它。客户端没有设置测试环境,并尝试通过ssh从数据库中使用sql转储复制所有20多万个php文件,但无法在本地运行。您的本地主机和live站点上的php版本是否存在差异?@lodder我想我找到了它。在布局中,我尝试
var\u dump($this)
,这会导致错误。在当地也有。我想我忘了复制布局,所以本地文件可以正常工作(在干净的joomla安装中)