$ .AJAX.error l c.fireWith T r错误? 这是什么?

This answer says it occurs when it sends twice.

Mine activates when a user changes the value in a selection box, so this isn't my problem.

Here is my previous question which shows my code and a few screenshots of the errors.

I couldn't get the 500 (Internal server error) working, hopefully solving the ajax problem first will help sort it out.

The full error from the console:

error                                                  admin-add-module:128
    $.ajax.error                                       admin-add-module:128
    l                                                  jquery-1.8.3.min.js:2
    c.fireWith                                         jquery-1.8.3.min.js:2
    T                                                  jquery-1.8.3.min.js:2
    r                                                  jquery-1.8.3.min.js:2

After changing JQuery to the full version it output this error:

enter image description here

I got rid of the 500 internet server error. I wasn't parsing through the link.

$app->post('/admin-get-add-module', function () use($app,$link){ <<<<<<<<LINK HERE
    $req = $app->request();
    $stackid = $_POST['stackid'];
    $myStacks = filterStacks($app);
    $app->view()->appendData(array("username" => getUsername($app)));
    $sql = $link->prepare("select * from evironments where StackID=?");
    error_log(var_export($sql,true));
    $sql->bind_param("i", $stackid);
})->name('admin-get-add-module');

It still doesn't work though here is a link to the sql / ajax problem