Missing Widget Gap in Web AppBuilder solution

410
3
01-20-2021 05:49 PM
ShelleySchott
Esri Contributor
5 3 410

I though I would share a solution to an issue which we were facing where a custom widget would leave a gap when it was redeployed.

Problem:

When a custom widget update/ redeployed which has previously been added to the Web AppBuilder gets corrupted, the custom widget ‘disappears’ from the Web App and the location of this widget also disappears. There is a gap and changing the widgets around does not fix this gap, it persists.

ShelleySchott_0-1611192836422.png

Setup:

  • ArcGIS Enterprise 10.7.1
  • WAB: Not Developer edition
  • Custom Widgets added as Portal Items
  • Foldable theme
  • Supposed to have 5 widgets below the search widget

Cause:

Orphaned Portal IDs which don’t exist in Portal in the Json file of the Web App.

Solution:

1. Open ArcGIS Online Assistant: https://ago-assistant.esri.com/#

2. View the JSON in AGO

3. Open the offending Web App:

 
 

4. The foldable theme has 5 widget placeholders:

Position 1 – Left: 55, Right: 45, Relation to: Map

Position 2 – Left: 105, Right: 45, Relation to: Map

Position 3 – Left: 115, Right: 45, Relation to: Map

Position 4 – Left: 155, Right: 45, Relation to: Map

Position 5 – Left: 205, Right: 45, Relation to: Map

 

Search for the position of the missing widget – In this case it’s position 3

5. Check the Portal ID it’s referencing exists

In our case, the Portal ID didn't exist

PortalID_NotExist.jpg

 

 

 

 

6. Search for the Portal ID for the redeployed widget that does exist

7. Replace the Portal ID in the Web App JSON (The existing Portal ID) in ArcGIS Online Assistant and save the changes.

8. The widget is now back and can be re-added if needed

Fixed.jpg

 

 

 

 

 

 

 

 

 

3 Comments
KeirenMarshall
Esri Contributor

Thank you for sharing 

AlexBowler
Esri Contributor

Really useful! Thank you!

 

With those widget placeholders, can you create new widget locations in JSON with new positions? To theoretically extend out the number of widget locations?

Thanks 

ShelleySchott
Esri Contributor

@AlexBowler , yes theoretically you can add a new widget location.

In the json there is a position location for the widgets in relation to the map, so you can add a new widget location. You would need to follow the spacing sequence when adding the new widget. Below is an example of what the json looks like.

ShelleySchott_0-1611202855150.png