问题
I am getting the following exception when trying to ok the value in x-editable. [Exception... "" 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', ) ),
),
));
?>
回答1:
This is a cryptic error for what may be a simple problem - the resource you're trying to reach cannot be hit. If you put a nonsense URL in, you would get this result. Also, you would get this if there was some kind of connection blocker, like an ad-block app, operating in the browser.
I would check the URL you're trying to hit by dumping it out to text and manually trying to see if you can reach the resource.
回答2:
just do this
'url' => Yii::app()->createUrl(
"examschedule/update",
array("examcode"=>$examcode,
"sessioncode"=>$sessioncode,
"subjectcode"=>$data->subjectcode))',
'placement' => 'right', )
),
回答3:
To anyone searching around, can reproduce this error:
While cooking up a wss://
websocket server locally.
[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”).
This error seems to be linked to a ssl certificate anomaly.
It raises up as exposed here when the ssl handshake succeed, but the Content Security Policy broke the ssl encrypted socket stream.
来源:https://stackoverflow.com/questions/19241605/exception-nsresult-0x805e0006-unknown-location-when-submitting-changes-us