Esri / application-boilerplate-3x-js

Starter application that simplifies the process of building templates for the ArcGIS.com template gallery.
https://developers.arcgis.com/javascript/
Apache License 2.0
90 stars 68 forks source link

Boilerplate Create > App > Using a Template fails to load webscene #98

Closed alaframboise closed 7 years ago

alaframboise commented 7 years ago

In My Content, if you check on a webscene and create a boilderplate template app through the menu, the Configuration window fails to load the item (the webscene you originally checked). To view it, you have to use the Configuration window to manually reselect the webscene. I looked at the boilerplate.results and the webscene is definitely missing. I think this is because the mixin code isn't getting the checked webscene from the newly created app or the webscene wasn't sent to the template from AGO. Not sure if this is an AGO bug or ours. Thoughts?

The other app templates don't seem to have this issue - probably because they have default webmap/webscene in the config.

Steps to repro:

  1. Configure the Boilerplate with default config JSON.
  2. In My Contents check on a webscene.
  3. Create a New Web App by selecting the Boilerplate.
  4. In the Configuration window > View (Error).
  5. Now manually re-select your webscene > View.

image

image

image

image

driskull commented 7 years ago

@alaframboise this seems like an issue with portal. Can you create an issue for them?

alaframboise commented 7 years ago

Hey @driskull, I'm guess I'm not sure what this has to do with the webscene viewer. I can reproduce the same error with a webmap. I think the issue is that the webmap and webscene url param is not being sent to the template.

image

driskull commented 7 years ago

Its a portal issue though, right? The boilerplate works with url params.

alaframboise commented 7 years ago

Ya, I think so. I just wasn't sure if the Boilerplate mixin was failing to extract it or if it's not there. From what I can see in the debugger, the Boilerplate isn't being sent the webmap/websene ID when you create a template this way. If you think portal and Boilerplate is good, I'll log it.

driskull commented 7 years ago

Look at the network inspector and see if its in the item. If its not, then its a portal issue.

alaframboise commented 7 years ago

I'm only seeing one request to Boilerplate with the appid. However if you set the webmap/webscene property, I see two requests. That's why I thought it was a Boilerplate error. Should the Boilerplate make a request for the map/scene if only sent an appid?

image

image

driskull commented 7 years ago

@alaframboise you have to look at the item data not just the item. The item data should have either a webmap or webscene in it.

driskull commented 7 years ago

The boilerplate will get the webmap or webscene from the URL, application item or config. If it doesn't exist in any of those then it cant get it.

This needs a little more research to see where the failure lies then an issue can be opened in the appropriate place.

alaframboise commented 7 years ago

Here's the data?f=json for the initial request and for the second request after manually selecting a webscene. I think this is what you were after? Why is the webscene data missing the first time around? Portal didn't send it?

image

image

driskull commented 7 years ago

I'm guessing portal doesn't save the webscene when the item is originally created.

alaframboise commented 7 years ago

Yip, that what I was thinking too. I'll log a portal issue. In the meantime, i'll hardcode a webmap/webscene into the config to avoid the failure.

iwittenmyer commented 7 years ago

that workflow of selecting a map or scene from the content grid and creating an app with it isn't supported, but maybe we can look into adding that capability as an enh.

driskull commented 7 years ago

Seems like it would be a good enhancement. Otherwise, users are dropped into an empty app.

alaframboise commented 7 years ago

@iwittenmyer Create > App is the only way I know how to test a 4.0 template unless there's a magic way to add 3d templates into the new Create Web App dialog.

driskull commented 7 years ago

Lets move this discussion into a Portal issue since this isn't a boilerplate issue. :)

iwittenmyer commented 7 years ago

i'll log the enh, because this scenario has not yet been supported. the workflow was pick the app, then pick the scene/map/group