Fusion Error in version 3.1.2 and 4.0 preview 1

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Fusion Error in version 3.1.2 and 4.0 preview 1

Liglio
Hi,

I installed the two versions and got the same error "Uncaught
ReferenceError: mapAgentUrl is not defined". I modified the index.html to
load FusionSF.js to see the exact location of the error, and in both
versions is the same location.

var getSiteVersion = function(sessionId, callback) {
        var xhr = getXmlHttpRequest();
// THE NEXT LINE mapAgentUrl  IS NOT DEFINED !!!
        xhr.open("GET", mapAgentUrl +
"?OPERATION=GETSITEVERSION&VERSION=1.0.0&LOCALE=en&CLIENTAGENT=MapGuide+Developer&SESSION="+
sessionId, true);
        xhr.onload = function (e) {
            if (xhr.readyState === 4) {
                if (xhr.status === 200) {
                    var verXML = xhr.responseXML.documentElement;
                    var el = verXML.getElementsByTagName("Version")[0];
                    var version = el.textContent || el.text;
                    var bits = version.split('.');
                    callback([
                        parseInt(bits[0]),
                        parseInt(bits[1]),
                        parseInt(bits[2]),
                        parseInt(bits[3])
                    ]);
                } else {
                    console.error(xhr.statusText);
                }
            }
        };
        xhr.onerror = function (e) {
            console.error(xhr.statusText);
        };
        xhr.send(null);
    };

The function before this one in FusionSF.js, mapAgentUrl is passed as
parameter:
var fetchAppDef = function(mapAgentUrl, appDefUrl, sessionId,
onAppDefFetched) {

but in getSiteVersion the variable mapAgentUrl is not defined.

I think is a recurrent problem at the code.



--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
_______________________________________________
mapguide-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapguide-users