<div dir="rtl"><div style="" dir="ltr">SOLVED: since the server is based on an older mapagent version, we hacked the mapagent.ts getSiteVersion() function with hardcoded JSON structure string.</div><div style="" dir="ltr">this was done since the old version return XML instead of JSON.</div><div style="" dir="ltr"><br></div><div style="" dir="ltr">/*<br>    public getSiteVersion(): Promise<SiteVersionResponse> {<br>        const p1 = { operation: "GETSITEVERSION", version: "1.0.0", username: "Anonymous" };<br>        const url = this.stringifyGetUrl({ ...p1 });<br>        return this.get<SiteVersionResponse>(url);<br>    }<br>*/<br>    public getSiteVersion(): Promise<SiteVersionResponse> {<br>              const jsonResponse = {<br>                        SiteVersion: {<br>                                "@xmlns:xsi": ["<a href="http://www.w3.org/2001/XMLSchema-instance">http://www.w3.org/2001/XMLSchema-instance</a>"],<br>                                "@xsi:noNamespaceSchemaLocation": ["SiteVersion-1.0.0.xsd"],<br>                              Version: ["3.1.1.4601"]<br>                     }<br>             };<br>            <br>              // Convert the response to match the expected interface<br>               return Promise.resolve({ Version: jsonResponse.SiteVersion.Version[0] });<br>     }</div></div><br><div class="gmail_quote gmail_quote_container"><div dir="rtl" class="gmail_attr">‫בתאריך יום ג׳, 18 בפבר׳ 2025 ב-10:41 מאת ‪Jackie Ng‬‏ <‪<a href="mailto:jumpinjackie@gmail.com">jumpinjackie@gmail.com</a>‬‏>:‬<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Please fully expand all the properties on the logged MapGuide/INIT_ERROR action, especially the error property and screenshot that<div><div><br></div><div>- Jackie</div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, 18 Feb 2025 at 18:33, Nimrod Cnaan <<a href="mailto:nimcnaan@gmail.com" target="_blank">nimcnaan@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="rtl"><img src="cid:ii_m7a60gw90" alt="image.png" width="562" height="190"><br></div><br><div class="gmail_quote"><div dir="rtl" class="gmail_attr">‫בתאריך שבת, 15 בפבר׳ 2025 ב-3:11 מאת ‪Jackie Ng via mapguide-users‬‏ <‪<a href="mailto:mapguide-users@lists.osgeo.org" target="_blank">mapguide-users@lists.osgeo.org</a>‬‏>:‬<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>This is not helpful. I do not see any relation between the unexpected token `<` and this error.</div><div><br></div><div>The mapInit property is an AJAX viewer API property that custom task pane content can test to see if the map viewer is ready to start using their other APIs. This error suggests that you must have a custom InvokeURL command that has some javascript that calls this property without testing that the call chain is already not null/undefined (ie. Caling parent.parent.mapInit without testing that parent.parent is not null/undefined first)</div><div><br></div><div>Again I am just speculating because I have not been given enough information to work with.</div><div><br></div><div>Can you switch over to use viewer-debug.js (instead of viewer.js) and provide screenshots of the viewer and relevant parts of the developer tools where the error is happening?</div><div><br></div><div>- Jackie</div><div><br></div><div>You wrote:</div><div><pre style="color:rgb(0,0,0)">this is the Error we get - Uncaught TypeError: Cannot read properties of
undefined (reading 'mapInit')
    at About:486:42</pre></div><div dir="ltr" class="gmail_signature"><div dir="ltr"><div></div></div></div></div>
_______________________________________________<br>
mapguide-users mailing list<br>
<a href="mailto:mapguide-users@lists.osgeo.org" target="_blank">mapguide-users@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/mapguide-users" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/mapguide-users</a><br>
</blockquote></div><div><br clear="all"></div><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="rtl" class="gmail_signature"><div dir="rtl"><p align="right"><font face="Times New Roman" size="3">

</font></p><div style="margin:0cm 0cm 0pt" dir="RTL"><span style="font-family:Arial,"sans-serif"" lang="HE">בכבוד רב,</span></div><div style="margin:0cm 0cm 0pt" dir="RTL"><span style="font-family:Arial,"sans-serif"" lang="HE"></span> </div><div style="margin:0cm 0cm 0pt" dir="RTL"><span style="color:rgb(0,0,153)"><b><span style="font-family:Arial,"sans-serif"" lang="HE">נמרוד כנען</span></b></span><b><span style="font-family:Arial,"sans-serif"" lang="HE"><span><span style="color:rgb(0,0,153)"> </span>  </span>|<span>   </span></span></b><span style="color:rgb(127,127,127);font-family:Arial,"sans-serif"" lang="HE">גיאומינד שירותי </span><font face="Calibri"><span style="color:rgb(127,127,127)" dir="LTR">GIS</span><span dir="RTL"></span><span dir="RTL"></span></font><span style="color:rgb(127,127,127);font-family:Arial,"sans-serif"" lang="HE"><span dir="RTL"></span><span dir="RTL"></span><span>  </span>–<span>  </span>פיתוח,<span> 
</span>ייעוץ<span>  </span>ושירותי ענן</span></div><div style="margin:0cm 0cm 0pt" dir="RTL"><font size="3"><span style="color:rgb(127,127,127);font-family:Arial,"sans-serif"" lang="HE"><font size="2">ישיר:
048101268 | נייד: 0525355483</font> |</span><span style="font-family:Arial,"sans-serif"" lang="HE"> <span style="color:rgb(89,89,89)"><a href="mailto:nimrod@geomind.co.il" target="_blank"><span style="color:rgb(89,89,89);font-family:Calibri,"sans-serif"" dir="LTR" lang="EN-US">nimrod@geomind.co.il</span></a></span></span></font></div><div style="margin:0cm 0cm 0pt" dir="RTL"><span dir="LTR" style="color:rgb(31,73,125)"><img src="http://geomind.co.il/GeomindLogo.png" height="52" width="177"><br></span></div><p style="margin:0cm 0cm 0pt" dir="RTL"><font size="2"><span style="color:black;font-family:Arial,"sans-serif"" lang="HE">נא בקרו באתר החדש שלנו</span><span style="color:red;font-family:Arial,"sans-serif"" lang="HE"> </span><span style="font-family:Arial,"sans-serif"" lang="HE"><a href="http://geomind.co.il/" target="_blank"><span style="font-family:Calibri,"sans-serif"" dir="LTR" lang="EN-US"><font color="#0000ff">http://geomind.co.il</font></span></a></span></font></p><p align="right"><font face="Times New Roman" size="3">

</font></p></div></div>
</blockquote></div><div><br clear="all"></div><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><a href="http://themapguyde.blogspot.com" target="_blank">http://themapguyde.blogspot.com</a></div></div></div></div>
</blockquote></div><div><br clear="all"></div><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="rtl" class="gmail_signature"><div dir="rtl"><p align="right"><font face="Times New Roman" size="3">

</font></p><div style="margin:0cm 0cm 0pt" dir="RTL"><span style="font-family:Arial,"sans-serif"" lang="HE">בכבוד רב,</span></div><div style="margin:0cm 0cm 0pt" dir="RTL"><span style="font-family:Arial,"sans-serif"" lang="HE"></span> </div><div style="margin:0cm 0cm 0pt" dir="RTL"><span style="color:rgb(0,0,153)"><b><span style="font-family:Arial,"sans-serif"" lang="HE">נמרוד כנען</span></b></span><b><span style="font-family:Arial,"sans-serif"" lang="HE"><span><span style="color:rgb(0,0,153)"> </span>  </span>|<span>   </span></span></b><span style="color:rgb(127,127,127);font-family:Arial,"sans-serif"" lang="HE">גיאומינד שירותי </span><font face="Calibri"><span style="color:rgb(127,127,127)" dir="LTR">GIS</span><span dir="RTL"></span><span dir="RTL"></span></font><span style="color:rgb(127,127,127);font-family:Arial,"sans-serif"" lang="HE"><span dir="RTL"></span><span dir="RTL"></span><span>  </span>–<span>  </span>פיתוח,<span> 
</span>ייעוץ<span>  </span>ושירותי ענן</span></div><div style="margin:0cm 0cm 0pt" dir="RTL"><font size="3"><span style="color:rgb(127,127,127);font-family:Arial,"sans-serif"" lang="HE"><font size="2">ישיר:
048101268 | נייד: 0525355483</font> |</span><span style="font-family:Arial,"sans-serif"" lang="HE"> <span style="color:rgb(89,89,89)"><a href="mailto:nimrod@geomind.co.il" target="_blank"><span style="color:rgb(89,89,89);font-family:Calibri,"sans-serif"" dir="LTR" lang="EN-US">nimrod@geomind.co.il</span></a></span></span></font></div><div style="margin:0cm 0cm 0pt" dir="RTL"><span dir="LTR" style="color:rgb(31,73,125)"><img src="http://geomind.co.il/GeomindLogo.png" height="52" width="177"><br></span></div><p style="margin:0cm 0cm 0pt" dir="RTL"><font size="2"><span style="color:black;font-family:Arial,"sans-serif"" lang="HE">נא בקרו באתר החדש שלנו</span><span style="color:red;font-family:Arial,"sans-serif"" lang="HE"> </span><span style="font-family:Arial,"sans-serif"" lang="HE"><a href="http://geomind.co.il/" target="_blank"><span style="font-family:Calibri,"sans-serif"" dir="LTR" lang="EN-US"><font color="#0000ff">http://geomind.co.il</font></span></a></span></font></p><p align="right"><font face="Times New Roman" size="3">

</font></p></div></div>