Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

osTicket v1.10 (stable) and Maintenance Release v1.9.15 are now available! Go get it now

Popup - object XMLHttpRequest

Lately, I've getting this popup window when I try to close a window with osTicket open.
It says object XMLHttpRequest.
Does anyone know what this is and how to get rid of it?
Thanks.

Comments

  • Hi tonyswu

    I'm getting the same pop-up.
    Also, since then, I am unable to use canned responses… how about you?
  • I have been using osTicket for a couple years, and this just started today. I haven't noticed anything that's broken, but I don't use many of the extra features either. I've set canned responses up, but have so many different issues from my userbase that canned responses would run into the hundreds. I don't know what else is broken, but the error comes up, but the notices are posted and saved. I hope the user gets the response.

    Testing that...

    Okay, canned responses work, and it appears nothing DOESN'T work. And that makes me happy, but something tells me this isn't a good thing any way...
  • edited January 2014
    The problem is back after last Chrome update Version 32.0.1700.76 m
  • Yes, this started for my customer just last week.  WTF??  any cure on the client end or the server end? 

    The page at  says:
    [object XMLHttpRequest]

    Using chrome, but am told it happens on other browsers too.
  • 1.6 is ancient, and browser technologies have changed since its release almost 4 years ago.
    I would recommend that you upgrade to a more current version as 1.6 is no longer really supported.
  • Yes, this started for my customer just last week.  WTF??  any cure on the client end or the server end?  The page at  says: [object XMLHttpRequest] Using chrome, but am told it happens on other browsers too.
    Tested on Firefox and IE11. No problems
  • I ran into this problem as well.  Was fine until Chrome 32.0.1700.76It seems to be related to the bsnAutoSuggest_2.1.3 mod I added from Timothy Groves.  This mod pulls user's info from LDAP and suggests names as you start typing in the name field for creating a new ticket.  When you select one, it then populates the name location and phone fields for you.  I was able to stop the pop up by commenting out a line in the ajax.js file (in my case located at {ost}/scp/js/ajax.js).  The line I commented out was line 47, which said " Http.enabled = (Http.req != null); "

    I know squat about javascript, so I can't speak to why this caused the error or why commenting out this line stopped the error yet the auto-suggest function continues to work fine.  Perhaps someone else with more skill can take a look and shed some more light.  Anyway, just wanted to contribute what I'd found.  I guess it is time to buckle down and stand up a test instance of the newest version and start working on porting all my mods over (sigh).
  • Happens for a fresh install on Chrome browser. How to fix this?
  • I ran into this problem as well.  Was fine until Chrome 32.0.1700.76.  It seems to be related to the bsnAutoSuggest_2.1.3 mod I added from Timothy Groves.  This mod pulls user's info from LDAP and suggests names as you start typing in the name field for creating a new ticket.  When you select one, it then populates the name location and phone fields for you.  I was able to stop the pop up by commenting out a line in the ajax.js file (in my case located at {ost}/scp/js/ajax.js).  The line I commented out was line 47, which said " Http.enabled = (Http.req != null); " I know squat about javascript, so I can't speak to why this caused the error or why commenting out this line stopped the error yet the auto-suggest function continues to work fine.  Perhaps someone else with more skill can take a look and shed some more light.  Anyway, just wanted to contribute what I'd found.  I guess it is time to buckle down and stand up a test instance of the newest version and start working on porting all my mods over (sigh).
    Wooow!!! nice catch in all that code!  I also commented out that line and the popup is no longer shown
  • edited January 2014
    I hat to undo the changes. After applying this change my canned responses are not longer working
  • I consulted with a friend of mine who knows more about javascript.  He suggested replacing the line:

    Http.enabled = (Http.req != null);

    with:

    if(Http.req != null) {
                           Http.enabled = true;
                   }

    I did this on my instance, and the error pop up is still gone.  I can't say whether or not canned responses work, as I don't use them.  Give it a try and see if it works for your needs.  Good luck!
  • I did that, However the error is still displayed in my case. Canned responses are working as usual. 
    If it works for you, probably I'm doing something wrong. This is my piece of code

    [...]

    Init: function(){

            if (window.XMLHttpRequest) {
                Http.req = new XMLHttpRequest();
            }
            else if (window.ActiveXObject) {
                Http.req = new ActiveXObject("Microsoft.XMLHTTP");
            }

    if (Http.req != null) {
                           Http.enabled = true;
                   }
    },
    get: function(params, callback_args){   

    [...]


  • Sorry, I forgot to refresh after I made the change.  I am still getting the error also.  That didn't work.
  • No problem Rhea69 :-)
  • Tracked the issue down but I'm not a javascript guy. The issue is in /scp/js/autolock.js and ajax.js

    I simply changed the following in "autolock.js"
       callback: function (resp){ alert(resp);}
    to
       callback: function (resp){ console.log("releaseLock: " + resp);}
    -
    Honestly I have no clue why we'd need to alert here or what would have changed in Chrome that started causing the alert to start showing... as I said, I'm no Javascirpt guy.
    --------------------
    the "releaseLock" function is calling Http.get out of ajax.js
    --------------------
    releaseLock: function(e) {
    console.log("autolock.js - fxn \"releaseLock\"");
            if(!autoLock.tid) { return false; }
            Http.get({
                url: "ajax.php?api=tickets&f=releaseLock&id="+autoLock.lockId+'&tid='+autoLock.tid,
                callback: function (resp){ alert(resp);}
                });
        },
    -----------------------------------------
    in "Http.get" the following section is pushing "Http.req" into cb_params which is then passed to the callback function from the autolock which throw's an alert with the "object XMLHttpRequest"
    -----
    cb_params.push(Http.req); // <- Http.req is your XMLHttpRequest Object
    for(var i=0;i<callback_args.length;i++) {
    cb_params.push(callback_args[i]);
    }
    callback.apply(null, cb_params);
    ------------

  • This is an issue with 1.6 codebase - which has since been discontinued and no longer maintained. Upgrade to v1.7.x or v1.8.x series.
  • osCesh Thank you very much for that fix.
Sign In or Register to comment.