Select to view content in your preferred language

Modifying image paths with ArcGIS Assistant

88
4
Jump to solution
Thursday
Labels (1)
DHighness
Occasional Contributor

Hi, we have a story map that was created a couple years ago in ArcGIS Online and we have migrated it to another organization. We have moved all the linked images to another web server and want to change the image URLs in the story map so they point to the new location. I opened the story map in ArcGIS Assistant and found and edited the image URLs and saved it. I thought, wow, got it!

When I open the story map in a browser and open the Developer Console the images are still loading from the old location, not the new one but when I open the config in ArcGIS Assistant they are changed. Can someone tell my what is going on? Is the story map loading from a cached build or something like that. I've cleared browser cache and viewing the site on machines that have never opened the site before and still loading from the old image location.

Thanks

0 Kudos
1 Solution

Accepted Solutions
PeterKnoop
MVP Regular Contributor

If you can, I would recommend updating the image URLs using the StoryMap module in the ArcGIS API for Python. It is a more robust approach, and runs less of a risk of leaving a StoryMap in an unexpected, broken state.

That said, if need to make the changes via Assistant, what version of the StoryMap JSON did you edit?

An individual StoryMap can exist in up to two different states, draft (or unpublished changes) and published, depending on what you've been doing with your StoryMap.

The draft and published versions are stored as separate resources, so in Assistant after you open your StoryMap item, go to the Resources tab. You'll find the draft version in a file named "draft_<timestamp>.json", and the published version in a file named "published_data.json".

Those two files are separate from the JSON under the Data tab for your StoryMap, which is the "current" JSON that gets used. When you edit a story, publish a story, discard changes, etc. the correct version is copied from draft or published to current. (Or something like that; what goes on behind the scenes is not publicly documented.)

I would recommend making sure the StoryMap you want to edit is published, so that both a draft and published version exist. I would also make a copy of the draft version's JSON elsewhere, so that you can paste it back in, should something go wrong with your edits.

Next, I would make your changes to the draft JSON version. (Don't have the StoryMap open for editing in another tab, or you run the risk of overwriting your changes!) After completing your edits, then open your StoryMap in Edit view, and verify the changes you've made are correct.

If everything looks good, then publish the StoryMap. If something goes wrong, and you're not sure how to fix it, then you can use "Discard unpublished changes" to revert to your previously published version of the StoryMap. (And, if you cannot reach the discard functionality because the story is too broken, then go back to the Assistant and paste back in the original draft JSON content.)

View solution in original post

4 Replies
MichaelVolz
Esteemed Contributor

Could there be more than 1 instance of the image path in the json file, so maybe you only changed 1 instance but this value which can be found multiple times?

0 Kudos
DHighness
Occasional Contributor

Yeah I've searched every single HTTP link in the JSON and they have all been changed.

0 Kudos
PeterKnoop
MVP Regular Contributor

If you can, I would recommend updating the image URLs using the StoryMap module in the ArcGIS API for Python. It is a more robust approach, and runs less of a risk of leaving a StoryMap in an unexpected, broken state.

That said, if need to make the changes via Assistant, what version of the StoryMap JSON did you edit?

An individual StoryMap can exist in up to two different states, draft (or unpublished changes) and published, depending on what you've been doing with your StoryMap.

The draft and published versions are stored as separate resources, so in Assistant after you open your StoryMap item, go to the Resources tab. You'll find the draft version in a file named "draft_<timestamp>.json", and the published version in a file named "published_data.json".

Those two files are separate from the JSON under the Data tab for your StoryMap, which is the "current" JSON that gets used. When you edit a story, publish a story, discard changes, etc. the correct version is copied from draft or published to current. (Or something like that; what goes on behind the scenes is not publicly documented.)

I would recommend making sure the StoryMap you want to edit is published, so that both a draft and published version exist. I would also make a copy of the draft version's JSON elsewhere, so that you can paste it back in, should something go wrong with your edits.

Next, I would make your changes to the draft JSON version. (Don't have the StoryMap open for editing in another tab, or you run the risk of overwriting your changes!) After completing your edits, then open your StoryMap in Edit view, and verify the changes you've made are correct.

If everything looks good, then publish the StoryMap. If something goes wrong, and you're not sure how to fix it, then you can use "Discard unpublished changes" to revert to your previously published version of the StoryMap. (And, if you cannot reach the discard functionality because the story is too broken, then go back to the Assistant and paste back in the original draft JSON content.)

DHighness
Occasional Contributor

Peter, thanks for teaching me something new! I edited the image paths in "draft_<timestamp>.json" in ArcGIS Assistant and then opened the story map for editing in the Story Map Editor and republished and now when I view the story map the image paths are correctly to the new path.

0 Kudos