在尝试使用x-editable中的值时,我收到以下异常。 [例外......“”nsresult:“0x805e0006()”location:“JS frame :: ::。send :: line 8400”data:no]
View Code:
<?php $this->widget('bootstrap.widgets.TbGridView', array(
'id' => 'subjectgrid',
'itemsCssClass' => 'table-bordered items',
'dataProvider' => new CActiveDataProvider('Examschedule',array(
'criteria'=>array('condition'=>"examcode=:newexam and sessioncode=:sessioncode",
'params'=>array(':newexam'=>$examcode, ':sessioncode'=>$sessioncode),),
'pagination'=>array('pageSize'=>15),)),
'columns'=>array(
array('name' => 'examcode', 'headerHtmlOptions' => array('style' => 'width: 10px'),),
array('name' => 'sessioncode', 'headerHtmlOptions' => array('style' => 'width: 10px'),),
array('name' => 'subjectcode', 'headerHtmlOptions' => array('style' => 'width: 10px'),),
array('name' => 'groupcode', 'headerHtmlOptions' => array('style' => 'width: 10px'), ),
array('class' => 'editable.EditableColumn', 'name' => 'dateofexam', 'headerHtmlOptions' => array('style' => 'width: 10px'),
'editable' => array('type' => 'date', 'viewformat' => 'dd-mm-yyyy',
'url' => 'Yii::app()->createUrl("examschedule/update",array("examcode"=>$examcode, "sessioncode"=>$sessioncode, "subjectcode"=>$data->subjectcode))',
'placement' => 'right',) ),
array('class' => 'editable.EditableColumn','name' => 'sitting', 'headerHtmlOptions' => array('style' => 'width: 10px'),
'editable' => array('type' => 'select', 'source'=>array('1'=>'First Sitting', '2'=>'Second Sitting'),
'url' => 'Yii::app()->createUrl("examschedule/update",array("examcode"=>$examcode, "sessioncode"=>$sessioncode, "subjectcode"=>$data->subjectcode))',
'placement' => 'right', ) ),
),
));
?>
答案 0 :(得分:6)
对于可能是一个简单的问题,这是一个神秘的错误 - 您尝试触及的资源无法被击中。如果你输入一个废话网址,你会得到这个结果。此外,如果在浏览器中运行某种连接阻止程序(如广告块应用程序),您就会得到此信息。
我会通过将其转储到文本并手动尝试查看您是否可以访问该资源来检查您尝试访问的网址。
答案 1 :(得分:0)
就这样做
'url' => Yii::app()->createUrl(
"examschedule/update",
array("examcode"=>$examcode,
"sessioncode"=>$sessioncode,
"subjectcode"=>$data->subjectcode))',
'placement' => 'right', )
),
答案 2 :(得分:0)
对于周围搜索的任何人,都可以重现此错误:
在本地烹饪wss://
Websocket服务器时。
[Exception... "<no message>" nsresult: "0x805e0006 (<unknown>)" location: "JS frame :: debugger eval code :: <TOP_LEVEL> :: line 10" data: no] debugger eval code:10:9
Content Security Policy: The page’s settings blocked the loading of a resource at wss://192.168.1.100:9005/ (“default-src”).
此错误似乎与 ssl证书异常有关。
当ssl握手成功时,它升高到此处暴露的位置,但是 Content Security Policy 破坏了ssl加密的套接字流。