<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Webmap not appearing in cloned storymap? in ArcGIS StoryMaps Questions</title>
    <link>https://community.esri.com/t5/arcgis-storymaps-questions/webmap-not-appearing-in-cloned-storymap/m-p/1488930#M4717</link>
    <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/66208"&gt;@KimVoros&lt;/a&gt;&amp;nbsp;Hi Kim, welcome to the wonderful world of the esri python api.&lt;BR /&gt;&lt;BR /&gt;I poked around a bit with the clone_items method and I believe I found the root cause of the issue you are running into.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Some references are not updating correctly in the new storymap item. Hopefully there will be a fix for this in the future.&lt;BR /&gt;&lt;BR /&gt;In the mean time I have this work around code for you to try out&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;new_items = other_gis_org.content.clone_items(
    [items_to_clone])

import json
for item in new_items:
    if item.type == "StoryMap":
        new_storymap = StoryMap(item=item)
        new_data = new_storymap._item.get_data()
        new_storymap._item.resources.remove("published_data.json")
        new_storymap._item.resources.add(file_name="published_data.json", text=new_data)
        draft_id = [typeKeyword[18:] for typeKeyword in new_storymap._item.typeKeywords if "smdraftresourceid" in typeKeyword][0]
        new_storymap._item.resources.remove(draft_id)
        new_storymap._item.resources.add(file_name=draft_id, text=new_data)
        new_storymap._item.update(data=json.dumps(new_data))
        print(f"StoryMap {item.title} cloned and updated")&lt;/LI-CODE&gt;</description>
    <pubDate>Tue, 11 Jun 2024 15:34:44 GMT</pubDate>
    <dc:creator>ThePreatorian</dc:creator>
    <dc:date>2024-06-11T15:34:44Z</dc:date>
    <item>
      <title>Webmap not appearing in cloned storymap?</title>
      <link>https://community.esri.com/t5/arcgis-storymaps-questions/webmap-not-appearing-in-cloned-storymap/m-p/1488579#M4715</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I successfully cloned my storymap from one organization to another, including an online webmap referenced in a sidecar. However, the cloned webmap does not appear within the sidecar.&lt;/P&gt;&lt;P&gt;I published a version of the storymap for reference. The sidecar section of the site is called 'Project Schools' and the first, blank section is where the web map should be appearing. The second section of the sidecar shows the webmap that fails to appear in the first section of the sidecar.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've done the following and still am unable to find the problem:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;recloned the whole storymap, to confirm it was not a transfer issue&lt;/LI&gt;&lt;LI&gt;was able to view the entire transferred webmap successfully after turning off public sharing of the 'source' storymap&lt;/LI&gt;&lt;LI&gt;successfully added a new reference to the web map and retained it as proof of concept in the sidecar&lt;/LI&gt;&lt;LI&gt;used ArcGIS Online assistant beta to confirm that the web map item ID was correct&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;I am using ArcGIS Online and used the Python API to make the transfer. I am relatively new to python, so I could have missed something simple.&lt;/P&gt;&lt;P&gt;Thank you in advance for any insight,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kim&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Storymap:&amp;nbsp;&lt;A href="https://storymaps.arcgis.com/stories/15ba3ff0ff1d43acb9f5718bc1ea3e7d" target="_blank"&gt;San Bernardino County Safe Routes to School Program (arcgis.com)&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jun 2024 00:02:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-storymaps-questions/webmap-not-appearing-in-cloned-storymap/m-p/1488579#M4715</guid>
      <dc:creator>KimVoros</dc:creator>
      <dc:date>2024-06-11T00:02:56Z</dc:date>
    </item>
    <item>
      <title>Re: Webmap not appearing in cloned storymap?</title>
      <link>https://community.esri.com/t5/arcgis-storymaps-questions/webmap-not-appearing-in-cloned-storymap/m-p/1488930#M4717</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/66208"&gt;@KimVoros&lt;/a&gt;&amp;nbsp;Hi Kim, welcome to the wonderful world of the esri python api.&lt;BR /&gt;&lt;BR /&gt;I poked around a bit with the clone_items method and I believe I found the root cause of the issue you are running into.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Some references are not updating correctly in the new storymap item. Hopefully there will be a fix for this in the future.&lt;BR /&gt;&lt;BR /&gt;In the mean time I have this work around code for you to try out&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;new_items = other_gis_org.content.clone_items(
    [items_to_clone])

import json
for item in new_items:
    if item.type == "StoryMap":
        new_storymap = StoryMap(item=item)
        new_data = new_storymap._item.get_data()
        new_storymap._item.resources.remove("published_data.json")
        new_storymap._item.resources.add(file_name="published_data.json", text=new_data)
        draft_id = [typeKeyword[18:] for typeKeyword in new_storymap._item.typeKeywords if "smdraftresourceid" in typeKeyword][0]
        new_storymap._item.resources.remove(draft_id)
        new_storymap._item.resources.add(file_name=draft_id, text=new_data)
        new_storymap._item.update(data=json.dumps(new_data))
        print(f"StoryMap {item.title} cloned and updated")&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 11 Jun 2024 15:34:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-storymaps-questions/webmap-not-appearing-in-cloned-storymap/m-p/1488930#M4717</guid>
      <dc:creator>ThePreatorian</dc:creator>
      <dc:date>2024-06-11T15:34:44Z</dc:date>
    </item>
    <item>
      <title>Re: Webmap not appearing in cloned storymap?</title>
      <link>https://community.esri.com/t5/arcgis-storymaps-questions/webmap-not-appearing-in-cloned-storymap/m-p/1488972#M4718</link>
      <description>&lt;P&gt;Realised I did not include the import statement that needs to be included at the top of the code above&lt;/P&gt;&lt;LI-CODE lang="c"&gt;from arcgis.apps.storymap.story import StoryMap&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jun 2024 16:55:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-storymaps-questions/webmap-not-appearing-in-cloned-storymap/m-p/1488972#M4718</guid>
      <dc:creator>ThePreatorian</dc:creator>
      <dc:date>2024-06-11T16:55:07Z</dc:date>
    </item>
  </channel>
</rss>

