Homepage is loading legacyHomePage.html even though we are new to ArcGIS

367
2
05-16-2022 05:12 AM
by Anonymous User
Not applicable

The custom homepage for our organisation is only displayed when a user is signed in. We want public users to be able to access it.

In answer to a previous question - Custom homepage not showing for public users - Esri Community - I was told that it looks like it is loading legacyHomePage.html

I've read this article and it says 'All ArcGIS Online organizations created after June 30, 2020 only have the new home page, so they don’t need to transition. 'Let’s transition to the new ArcGIS Online home page (esri.com)

We only started our ArcGIS Online account last year so I don't understand why we're having a problem.

Has anyone else had this problem, or can anyone advise what to do?

Many thanks Ruth

 

Tags (2)
0 Kudos
2 Replies
jcarlson
MVP Esteemed Contributor

I looked into this further, and when I go to switch my org's homepage from the legacy to the new one, my browser is sending the following POST request:

https://kendall.maps.arcgis.com/sharing/rest/portals/self/update

With this item in the payload:

{"homePage":"modern"}

 Other org settings were in the payload as well, but this, I think, is the relevant one. I've never attempted to update AGOL settings directly from a POST request, but as long as you include a valid token, I can't see why it wouldn't work.

If you're comfortable with a bit of Python, this worked for me:

import requests

token_url = 'https://arcgis.com/sharing/generateToken'
token_obj = {
    'f':'json',
    'username':'your-username',
    'password':'your-password',
    'client':'requestip'
}

t = requests.post(tokenurl, tokenobj)

token = t.json()['token']

update_url = 'https://your-org.maps.arcgis.com/sharing/rest/portals/self/update'
update_obj = {
    'portalProperties': {'homePage':'modern'},
    'token': token,
    'f': 'json'
}

u = requests.post(update_url, update_obj)

print(x.text)

And you ought to get a response like this:

{"success":true,"orgId":"your-org-id"}

Note that I used Python mostly because it's what I'm most familiar with. You could as easily do this by another method, even directly from your browser.

Next time you visit your homepage, it should be updated! Key word "should".

- Josh Carlson
Kendall County GIS
by Anonymous User
Not applicable

Thanks for looking into this, Josh. Unfortunately I'm not experienced with Python or POST requests. However, I like learning new things so I'll read up about it and see if it makes sense to me. I'll let you know how I get on.

Thanks for your help! 

0 Kudos