-
Type:
Bug
-
Status: Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 16.0.10.44
-
Fix Version/s: 16.0.10.44
-
Component/s: FreePBX Framework
-
Labels:None
-
ToDo:
-
Module Fix Version:
{
"error": {
"type": "Whoops\\Exception\\ErrorException",
"message": "Undefined index: popovers",
"file": "/usr/src/freepbx/framework/amp_conf/htdocs/admin/libraries/BMO/Destinations.class.php",
"line": 114
}
}
The following code throws the exception when querying the data via AJAX.
class Superfecta extends FreePBX_Helpers implements BMO {
....
public function ajaxHandler() {
...
return array("status" => true, "html" => $this->showPage("superfecta.add"));
...
}
public function showPage($page, $params = array()) {
...
return load_view(__DIR__.'/views/view.superfecta.grid.create.php');
...
}
...
}
File (_DIR_.'/views/view.superfecta.grid.create.php):
....
<div class="col-md-9"><?php echo drawselects('', 0, FALSE, FALSE)?></div>
....
JS code to query the data:
var post_data = {
module: "superfecta",
command: "dialog_new_scheme"
};
$.post(window.FreePBX.ajaxurl, post_data, function(data) {
if (data.status) {
$(body).html( data.html );
} else {
fpbxToast(data.message, '', "error");
}
})
.fail(function(xhr, textStatus, errorThrown) {
fpbxToast(xhr.responseText, '', "error");
});