Opened 16 years ago

Closed 16 years ago

#623 closed defect (fixed)

Fusion Error When Selecting From Search Results

Reported by: poulet1212 Owned by:
Priority: medium Milestone:
Component: Fusion Version: 2.0.1
Severity: blocker Keywords:
Cc: External ID:

Description

After displaying the result of a query in a list, clicking on a link should make map zoom on this feature, but it always spawn a "fusion callback error" (version 1.0.6). This error happend in any cases.

Error detail:

jx_combined.js at Line 876:

this.transport.send(body);

these parameters are sent to ajax request handler:

params: "mapname=broc48727420f053a&session=3c7ba616-0000-1000-8006-001560c2f391_fr_7F0000010AFC0AFB0AFA&selection=%253C%253Fxml%2520version%253D%25221.0%2522%2520encoding%253D%2522UTF-8%2522%253F%253E%253CFeatureSet%2520xmlns%253Axsi%253D%2522http%253A%252F%252Fwww.w3.org%252F2001%252FXMLSchema-instance%2522%2520xsi%253AnoNamespaceSchemaLocation%253D%2522FeatureSet-1.0.0.xsd%2522%253E%2520%253CLayer%2520id%253D%25223cd8a1cc-0000-1000-8002-001560c2f391%2522%253E%2520%2520%253CClass%2520id%253D%2522Default%253APARC%2522%253E%2520%2520%2520%253CID%253E1gEAAA%253D%253D%253C%252FID%253E%2520%2520%253C%252FClass%253E%2520%253C%252FLayer%253E%253C%252FFeatureSet%253E&seq=0.7727463879888364"

url: "http://localhost:8008/mapguide//fusion/MapGuide/php/SetSelection.php"

Change History (1)

comment:1 by poulet1212, 16 years ago

Resolution: fixed
Status: newclosed

I Found the problem:

the featureset contained in "selection" parameter is javascript-escaped twice.

Looking to the sample above and doing an javascript "unescape" return this:

%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3CFeatureSet%20xmlns%3Axsi%3D%22http%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema-instance%22%20xsi%3AnoNamespaceSchemaLocation%3D%22FeatureSet-1.0.0.xsd%22%3E%20%3CLayer%20id%3D%223cd8a1cc-0000-1000-8002-001560c2f391%22%3E%20%20%3CClass%20id%3D%22Default%3APARC%22%3E%20%20%20%3CID%3E1gEAAA%3D%3D%3C%2FID%3E%20%20%3C%2FClass%3E%20%3C%2FLayer%3E%3C%2FFeatureSet%3E

Doing once again an unsecape would return this:

<?xml version="1.0" encoding="UTF-8"?><FeatureSet xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FeatureSet-1.0.0.xsd"> <Layer id="3cd8a1cc-0000-1000-8002-001560c2f391"> <Class id="Default:PARC"> <ID>1gEAAA==</ID> </Class> </Layer></FeatureSet>

Hacking the params with firebug make the widget work.

We must figure out where it was escaped twice to solve the problem.

Rémy

Note: See TracTickets for help on using tickets.