Esri / Esri/arcgis-python-api

Clone Hub Site Doesn't Properly Swizzle Menu Links to Hub Pages

Open
#1,559 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Python
Stars
2.2k
Forks
1.2k
Avg merge
2h 40m
Merged PRs (30d)
2

Description

**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:
1. 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

2. Run the below code:
```python
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.
![image](https://github.com/Esri/arcgis-python-api/assets/48392427/a72000c8-78e5-4ee9-8e47-4c638efdd134)
![image](https://github.com/Esri/arcgis-python-api/assets/48392427/268671f3-66ba-4b68-82ed-9645e7509462)
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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.