Re: [mapguide-users] mapAgentURL is not defined in FUSION mapguide

2020-02-17 Thread RachelF
Hi,
I know this is an older thread but I also had the same problem with
MapAgentUrl not being defined. I thought I would post to help anyone having
the same trouble in future

For me Liglio's method of using the old fusionSF file worked, so there seems
to be a problem with the current fusionSF version. (I have Mapguide
installed on Ubuntu 14.04 server and Maestro on Windows)



--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
___
mapguide-users mailing list
mapguide-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapguide-users

Re: [mapguide-users] mapAgentURL is not defined in FUSION mapguide

2019-08-11 Thread Rodolfo Moreno
I am Rodolfo and Thanks Liglio.
I used the FusionSF.jc that you sent me. The fusion layout works fine by a
moment but after 1o seconds the fusion launched an error message:

Error Details:
Exception occurred in AJAX callback.
Message: Cannot read property 'message' of undefined
Location: undefined (undefined)
Inner Stack: TypeError: Cannot read property 'message' of undefined
at Object.ajaxException
(http://localhost/mapguide/fusion/lib/fusionSF1.js:788:77)
at http://localhost/mapguide/fusion/lib/fusionSF1.js:46607:25
at initialize.respondToReadyState
(http://localhost/mapguide/fusion/lib/fusionSF1.js:97018:51)
at initialize.onStateChange
(http://localhost/mapguide/fusion/lib/fusionSF1.js:96931:18)
at XMLHttpRequest.
(http://localhost/mapguide/fusion/lib/fusionSF1.js:46607:25)
Response:  

When I compared my file with your fusionSF file I realized that your file is
of 2017 and the mine is of 2018. 





--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
___
mapguide-users mailing list
mapguide-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapguide-users

Re: [mapguide-users] mapAgentURL is not defined in FUSION mapguide

2019-08-08 Thread Liglio
Rodrigo,
fusionSF.zip   

Try the fusionSF.js file I use (I also use Mapguide 3.1.2). See the link.

Regards



--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
___
mapguide-users mailing list
mapguide-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapguide-users

Re: [mapguide-users] mapAgentURL is not defined in FUSION mapguide

2019-08-05 Thread Rodolfo Moreno
Thanks Liglio,
I made what you suggested.
_
var getSiteVersion = function(sessionId, callback) {
var xhr = getXmlHttpRequest();  
*var mapAgentUrl = getAgentUrl();*
xhr.open("GET", mapAgentUrl +
"?OPERATION=GETSITEVERSION=1.0.0=en=MapGuide+Developer="+
sessionId, true);
__

And now fusion is launched another error:

Error Details:
Uncaught TypeError: callback is not a function

Stack Trace:
 - ? at http://localhost/mapguide/fusion/lib/fusionSF.js (line: 1698)

here the code in that line:
__
var getAgentUrl = function(callback) { 
/* 
* if the application has been loaded from the same host as 
* fusion is installed in, then technically we don't need to 
* use the redirect script because we conform to the  
* Same Origin Policy for XmlHttpRequest to work. 
*/ 
var fusionURL = Fusion._getScriptLocation(); 
var testUrl = window.location.protocol + '//' +
window.location.host; 
var configUrl = 'config.json'; 

if (((Fusion.fusionURL.indexOf("http://;) < 0) ||
(Fusion.fusionURL.indexOf(testUrl, 0) == 0)) && !(Fusion.bForceRedirect)) { 
Fusion.sRedirectScript = ''; 
} 
else { 
Fusion.sRedirectScript = 'redirect.php'; 
configUrl += '=get'; 
} 

var r = Fusion.getRedirectScript(); 
if (r != '') { 
r = r + '?s='; 
} 

var fusionURL = r + Fusion.getFusionURL() + configUrl; 

var xhr = getXmlHttpRequest(); 
xhr.open("GET", fusionURL, true); 
xhr.onload = function (e) {
if (xhr.readyState === 4) {
if (xhr.status === 200) {
//Can't use parseJSON as this JSON file will most likely
have comments
eval("Fusion.configuration=" + xhr.responseText); 
var s = Fusion.configuration.mapguide.webTierUrl; 
/* if it is set, use it ... otherwise assume fusion is
installed in 
* the default location and compute the web tier url from
that 
*/ 
if (s) { 
var nLength = s.length; 
var slastChar = s.charAt((nLength - 1)); 
if (slastChar != '/') { 
s = s + "/"; 
} 
} else { 
var idx = Fusion.fusionURL.lastIndexOf('fusion'); 
if (idx == -1) { 
s = Fusion.fusionURL + "../";   //loaded
relatively from within fusion directory 
} 
else { 
s = Fusion.fusionURL.substring(0, idx); 
} 
} 
Fusion.configuration.mapguide.mapAgentUrl = s +
'mapagent/mapagent.fcgi'; 
*callback(Fusion.configuration.mapguide.mapAgentUrl);*
(LINE 1698)
} else {
console.error(xhr.statusText);
}
}
};
xhr.onerror = function (e) {
console.error(xhr.statusText);
};
xhr.send(null); 
}
___

what could be the problem?





--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
___
mapguide-users mailing list
mapguide-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapguide-users

Re: [mapguide-users] mapAgentURL is not defined in FUSION mapguide

2019-08-05 Thread Liglio
Hi Rodolfo,

Just put this line before line 1747, and mapAgentUrl variable will not be
null:
(don't add the mapAgentUrl Parameter to the getSiteVersion as you mentioned)

var mapAgentUrl = getAgentUrl();

This will work

Regards



--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
___
mapguide-users mailing list
mapguide-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapguide-users

Re: [mapguide-users] mapAgentURL is not defined in FUSION mapguide

2019-08-02 Thread Rodolfo Moreno
Hi Liglio, 
This is the code

Line 1745: var getSiteVersion = function(sessionId, callback) {
Line 1746:var xhr = getXmlHttpRequest();  
*Line 1747:xhr.open("GET", mapAgentUrl +
"?OPERATION=GETSITEVERSION=1.0.0=en=MapGuide+Developer="+
sessionId, true);
*
Line 1748:xhr.onload = function (e) {
Line 1749: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); 
};

What I tried was to add the mapAgentUrl Parameter to the function like this:

Line 1745: var getSiteVersion = function( *mapAgentUrl*, sessionId,
callback) {

but in that case fusion doesnt lunch any error but the map is in blank. In
the web browser console log I saw:
/mapguide/fusion/templates/mapguide/slate/92e7f2f6-b59b-11e9-8000-fcf8aef6937a_en_MTI3LjAuMC4x0AFC0AFB0AFA?OPERATION=GETSITEVERSION=1.0.0=en=MapGuide+Developer=function(version)%20{%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20Fusion.sessionId%20=%20passedSessionId;%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20Fusion.siteVersion%20=%20version;%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20cb();%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20}:1
Failed to load resource: the server responded with a status of 404 (Not
Found)
fusionSF.js:1762 Not Found
xhr.onload @ fusionSF.js:1762

I hope that you can help me. Thanks in advance Liglio



--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
___
mapguide-users mailing list
mapguide-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapguide-users

Re: [mapguide-users] mapAgentURL is not defined in FUSION mapguide

2019-07-31 Thread Liglio
Rodolfo,

Debug the FusionSF code to know where is the exact point, and copy here.

Regards



--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
___
mapguide-users mailing list
mapguide-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapguide-users

Re: [mapguide-users] mapAgentURL is not defined in FUSION mapguide

2019-07-24 Thread Rodolfo Moreno
Thanks Liglio and RenoSun for your answer.
I reviewed the FusionSF.js and could see that the changes suggested already
were done.
Modify the index.html to work with FusionSF.js
next I launched the slate template from maestro and the error say:

Error Details:
Uncaught ReferenceError: mapAgentUrl is not defined

Stack Trace:
 - ? at http://localhost/mapguide/fusion/lib/fusionSF.js (line: 1747)

Source:
http://localhost/mapguide/fusion/templates/mapguide/slate/index.html?session=3ade0cc8-ae41-11e9-8000-fcf8aef6937a_en_MTI3LjAuMC4x0AFC0AFB0AFA=Session:3ade0cc8-ae41-11e9-8000-fcf8aef6937a_en_MTI3LjAuMC4x0AFC0AFB0AFA//Preview4.ApplicationDefinition=en

Which could be the error?

Thanks in advance



--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
___
mapguide-users mailing list
mapguide-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapguide-users

Re: [mapguide-users] mapAgentURL is not defined in FUSION mapguide

2019-07-23 Thread RenoSun
Hi Rodolfo,

Please try Liglio's solution first. The role should be "Administrator".

Thanks,
Reno



--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
___
mapguide-users mailing list
mapguide-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapguide-users

Re: [mapguide-users] mapAgentURL is not defined in FUSION mapguide

2019-07-23 Thread Liglio
Hi,

I got the same error. I changed the file FusionSF.js at line 1710 the
original was:

var fetchAppDef = function appDefUrl, sessionId, onAppDefFetched) {
var xhr = getXmlHttpRequest();
xhr.open("GET", mapAgentUrl +
"?OPERATION=GETRESOURCECONTENT=1.0.0=en=MapGuide+Developer="
+ appDefUrl + "=text%2Fxml="+ sessionId, true); 

I changed to:

var fetchAppDef = function(mapAgentUrl, appDefUrl, sessionId,
onAppDefFetched) {
var xhr = getXmlHttpRequest();
xhr.open("GET", mapAgentUrl +
"?OPERATION=GETRESOURCECONTENT=1.0.0=en=MapGuide+Developer="
+ appDefUrl + "=text%2Fxml="+ sessionId, true); 

and passed the mapAgentUrl as argument at line 447

fetchAppDef(mapAgentUrl, appDefUrl, Fusion.sessionId, onAppDefFetched);

and I am using the FusionSF.js insted Fusion-compressed.js




--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
___
mapguide-users mailing list
mapguide-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapguide-users

Re: [mapguide-users] mapAgentURL is not defined in FUSION mapguide

2019-07-23 Thread Rodolfo Moreno
Hi Reno, thanks for your response
- "When you use .NET to display fusion with iframe, you no longer need to
send session id"
I am not using iframe with fusion
- "please double check if using SSL/non-SSL affect this as well"
I am not using SSL 
- "make sure you assign proper role to the mapguide user that you use to
load fusion"
I am loading the fusion template from maestro. which must be the role to
mapguide user? Where must I specify this role?
by last, Is there some piece of code that I should modify in fusion.js or in
other files?

Thanks in advance



--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
___
mapguide-users mailing list
mapguide-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapguide-users

Re: [mapguide-users] mapAgentURL is not defined in FUSION mapguide

2019-07-22 Thread RenoSun
Same issue here...going to see if I can fix it.



--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
___
mapguide-users mailing list
mapguide-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapguide-users