Uploaded image for project: 'FreePBX'
  1. FreePBX
  2. FREEPBX-23121

Drawselects, ErrorException > Undefined index: popovers

    XMLWordPrintable

    Details

    • 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:

      Description

      
      {
          "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");
      });
      

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                vsc55 VSC55
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  NextupJiraPlusStatus

                  Error rendering 'slack.nextup.jira:nextup-jira-plus-status'. Please contact your Jira administrators.