Select to view content in your preferred language

Missing Widget Gap in Web AppBuilder solution

2666
6
01-20-2021 05:49 PM
ShelleySchott
Esri Contributor
6 6 2,666

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

 

 

 

 

 

 

 

 

 

6 Comments
by Anonymous User
Not applicable

Thank you for sharing 

by Anonymous User
Not applicable

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

@Anonymous User , 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

 

by Anonymous User
Not applicable

Hi,

The search widget disappeared from Web App builder - Launchpad Theme. Normally, the search widget was located on the header. I can see it in the controller tab however, WAB doesn't allow me to configure the search widget. I removed the feature layer from the map that was connected to the search widget. Could that be the reason why it's missing? I intended to connect it to a new layer however, I have no control over the search widget now. Any thoughts?  

Search widget bug.PNG

MehdiPira1
Esri Contributor

@ShelleySchott ,

Great! Thanks.

GeorginaScholes
Esri Contributor

Hi @Anonymous User 

Did you ever figure out what the problem was or find a solution? I have a similar issue.

Thanks.