arcgis-python-api
arcgis-python-api copied to clipboard
Clone Hub Site Doesn't Properly Swizzle Menu Links to Hub Pages
Describe the bug When using the Hub submodule to clone a Hub site and authenticated as a Publisher, the operation succeeds. However, when using the menu links to navigate to one of the pages, information is shown about the original page (see screenshot below) as opposed to showing the content of the cloned page.
To Reproduce Steps to reproduce the behavior:
-
Create a Hub Site by following the below steps: a. Log in to AGOL as a publisher b. Go to Content -> My Content c. Click Create app -> Sites d. Give your Site a name e. Click Create Site f. Add at least one Page to the Site g. Add a menu link to the landing page that navigates to the Page you created h. Click Save, then click Publish Draft
-
Run the below code:
from arcgis.gis import GIS
gis = GIS(url, un, pw)
print('authenticated user role: {}'.format(gis.users.me.role))
hub = gis.hub
site_to_clone = hub.sites.get(item_id)
cloned_site = hub.sites.clone(site_to_clone, pages=True, title='Clone Site in PSDBS')
error: N/A
Screenshots
If applicable, add screenshots to help explain your problem.
The item ID shown in the URL bar is the item ID of the original Page, not the cloned Page.
Expected behavior I expect cloning the site to correctly swizzle all data sources/referenced content. I should see the content of the cloned page when navigating to the page via the menu link.
Platform (please complete the following information):
- OS: Windows 10
- IDE: Visual Studio Code
- Python API Version: 2.1.0.3
Additional context Add any other context about the problem here, attachments etc.