I have a Portal 10.8 webmap. Published from the latest Pro from data in MSSQL SDE. It has one layer with popups configured. They work fine in the Webmap viewer:
https://portal.axisgis.com/portal/home/webmap/viewer.html?webmap=59641cba9f7d4fc39a21d3125b48e9a5&ex...
Oddly when I added the service FranklinMA/Parcel_Popup (MapServer) as a map image layer, enabled popups, nothing at all showed up, it said No Information Available. So then I added the sublayer as a FeatureLayer (i.e with the /0 at end) and it shows the popup fine in the webmap viewer. (never seen this happen before, but this is my first time using Portal so I am thinking it's definitely a design issue or bug with Portal. The layers are public) Also I noticed duplicate labels for the Lot numbers in the Pen example below, but not in the webmap. (in the Pen they are duplicated. But labels are NOT on. It is not respecting that webmap setting; another thing I've never seen before)
However, only one field renders in the popup in even the basic Popup API Sample. https://codepen.io/kevinsagis/details/BaKodWZ
All other fields are blank. Very weird. The fields are from a joined table but that is fine; they load fine even in the Webmap viewer in a new incognito tab when logged out. Same with the image that is linked. Works fine in the webmap But in the sample they don't load. (which is because the images are coming from a filename URL field)
Actually now the image is not even loading in the sublayer FeatureLayer. Same 'sql error' as below. Anyone else seeing this?
In the Network traffic it shows an error:
- {error: {code: 400, extendedCode: -2147220949, message: "Unable to complete operation.",…}}
- error: {code: 400, extendedCode: -2147220949, message: "Unable to complete operation.",…}
- code: 400
- details: ["An SQL statement with comments and/or semicolon is invalid."]
- 0: "An SQL statement with comments and/or semicolon is invalid."
- extendedCode: -2147220949
- message: "Unable to complete operation."
https://codepen.io/kevinsagis/details/BaKodWZ
Complete code:
<html>
<head>
<meta charset="utf-8" />
<meta
name="viewport"
content="initial-scale=1,maximum-scale=1,user-scalable=no"
/>
<title>Load a basic WebMap | Sample | ArcGIS API for JavaScript 4.16</title>
<style>
html,
body,
#viewDiv {
padding: 0;
margin: 0;
height: 100%;
width: 100%;
}
</style>
<link
rel="stylesheet"
href="https://js.arcgis.com/4.17/esri/themes/light/main.css"
/>
<script src="https://js.arcgis.com/4.17/"></script>
<script>
require([
"esri/views/MapView",
"esri/WebMap",
"esri/config",
"esri/widgets/Popup"
], function (MapView, WebMap, esriConfig, Popup) {
esriConfig.portalUrl = "https://portal.axisgis.com/portal";
var webmap = new WebMap({
portalItem: {
id: "59641cba9f7d4fc39a21d3125b48e9a5" }
});
var view = new MapView({
map: webmap,
container: "viewDiv"
});
});
</script>
</head>
<body>
<div id="viewDiv"></div>
</body>
</html>