BUG? - Links in map tip broken when using related table replacement token
Is anyone experiencing the following behavior with related tables and the generated link when a map tip first shows up?


We are using the HTML5 2.6 viewer. The feature description and long description contain the same description as follows.
Name: {PROJECT_INFO.project_name}<br/> <a href="command:RunWorkflowWithArguments?workflowId=RunReportFromHyperlink&Project_nbr={project_nbr}&LayerName=ALL_POLYS_SDE&ReportId=0">Get project report.</a>
This displays fine. However, when this is first displayed in a map tip the generated url has javascript that appears to prevent mouse events or at least prevents the any links from working. Here is what the map tip link appears when first opened.
<a _key="1" href="javascript:void(0)" data-binding="{@event-onclick: handleHyperlinkClick}{@event-mouseup: ignoreEvent}{@event-mousedown: ignoreEvent}">Get project report.</a>
Links with this format fail to work.However, if you click view additional details the generated link does not have the kill mouse events and the link works. The link generates correclty in both side panel view and in the expanded table view.
If the feature you selected on the map has multiple records the map will show you a number of records you can page through. Again the first time the map tip opens the kill mouse event code is present. However, if you press the arrow button (or choose a different result from the drop down) the generated link will work as the javascript code is gone.

The link issue appears to be due to using related table data. For example. If the description using the following the href below it will generate a bad link.
Name: {PROJECT_INFO.project_name}<br/>
If plain text is used or a field from the current feature is used the link is generated correclty.
Name: {project_nbr}<br/>
0
-
Another point of data for this link behavior. If the map service for the layer is a feature layer the link works the first time in the map tip. If the service is a map service the link does not work in the map tip.
We switched the service in Geocortex between Map Service to Feature Layer and the map tip link worked. We switched the service back from a Feature Layer to a Map Service and the map tip link doesn't work.0 -
We are experiencing a similar issue.
If I try to use <a href> with a field from a related table, the URL does not open; nothing happens.
If I hardcode an <a href> it works (as long as 'http' is included in the address).
I haven't tried switching it to a feature layer but I will.
The odd thing is, the map tip will read the related table in the <img src> without any issues. I wonder why the behaviour is different in the <a href>.
Anyone else have this problem?0 -
This was an issue (GVH-15819) that was fixed in version 2.9.1 of the HTML5 viewer. Please upgrade to avoid this issue.
Regards,
Wayne Richard
Latitude Geographics Group Ltd.
Head Office: 300 – 1117 Wharf Street Victoria, BC Canada V8W 1T7
Tel: (250) 381-8130 | Fax: (250) 381-8132 | wrichard@latitudegeo.com
Developers of Geocortex web-based mapping software | www.geocortex.com
An Esri Platinum Business Partner0 -
I'm still haing the issue with 2.10.1, anyone else? 0 -
@Chris Slavin
Back when we were still using 2.6 we just creating a new dataset and avoiding related table tokens. If you inspect the link does it have the ignore click code in it again?0 -
Yes, here is what I get: {@event-onclick: handleHyperlinkClick}{@event-mouseup: ignoreEvent}{@event-mousedown: ignoreEvent} 0 -
@Chris Slavin
Did a quick search for part of that string in 2.10.1. Mapping.Infrastructure.js has a method insertLinkAndImageBindings (m.prototype.insertLinkAndImageBindings). Within that is a bunch of regex for links.var d = /(<a.*?href\s*?=\s*?")(command:.+?)(".*?)(\/?>)/,
c = a.replace(/<a[^>]*(\/?>)/g, function (a, c, g, e) {
return (c = a.match(d)) ? (g = "", (a = a.match(/(title|aria-label)\s*?=\s*?"[^"]*?"/g)) &&
(g = " " + a.join(" ")), '<a _key="' + b.keyForUri(c[2]) + '" href="javascript:void(0)" data-binding="{@event-onclick: handleHyperlinkClick}{@event-mouseup: ignoreEvent}{@event-mousedown: ignoreEvent}"' + g + c[4]) : a
}),0 -
Hi Allison or Chris,
Could you guys please give me some examples how you use href with the related table data? What I did is <a href=http://www.google.ca/?q={Trees.COMMON_NAME}>test</a>, which works for me. Tested in GVH 2.10.1.
Thanks
Long0 -
In our application, we use releated records to create the links that match to different images, such as:
<a href="https://xxx.org/gisdata/Scaned-Documents/As-Built/Maintenance/{layers.ATLAS.ATTACHMENTS.DOC_NAME}.tif">
If we create links using the way you mentioned, we don't see an issue. This did worked in 2.7.20 -
Hello Chris,
Can you provide an update on your status with this issue?
Thanks, Stefan
0 -
We are on Viewer for HTML5 2.11.0 and the link still does not work. 0
Du måste logga in om du vill lämna en kommentar.
Kommentarer
11 kommentarer