Select to view content in your preferred language

Duplicate navigation bars??

128
5
a week ago
SaraJL
by
Frequent Contributor

Hello everyone!

I have no idea how this happened - but somehow I ended up with duplicate navigation bars and I can't figure out how to get rid of the extra one. I've tried clearing the cache, multiple browsers, opening it in an incognito window....everything I could think of.

Here is the link to the StoryMap

SaraJL_0-1764188625345.png

 

Tags (2)
0 Kudos
5 Replies
OwenGeo
Esri Notable Contributor

@SaraJL - We are looking into this and will post here when we have more information.

Owen Evans
Lead Product Engineer | StoryMaps
0 Kudos
ThePreatorian
Esri Contributor

Hey @SaraJL , after looking into the story, there is another navigation in the story structure (which should not happen). I also noticed the story was edited with python. Was this story created with a specific python script?

0 Kudos
SaraJL
by
Frequent Contributor

@ThePreatorian I created this one with the StoryMap converter tool! This is actually one I was trying to convert from the Cascade legacy template. 

I converted it first - but for some reason, the tool only pulled over the top section of the StoryMap, so I had to manually recreate the rest of it. I turned on the Navigation at the very end, and that's when the duplicate bar showed up. It didn't do that with the others I was working on, so I couldn't figure out what the cause might be.

Here is the original version - when I initially converted it, it only pulled the first section. But nothing beyond the "Differences in Physcial and Digital Archive Work".

I'm hoping there is some way to salvage it. It took me at least 4 hours to recreate this one from mostly scratch.....

Any advice is welcome!

0 Kudos
ThePreatorian
Esri Contributor

Im sorry you ran into this edge case with the converter tool. The good news is we can use python to fix the issue

### imports and gis connection above
# connect to storymap/duplicate
my_sm = StoryMap(story_id)
# 1. Define your target IDs as constants for readability
TARGET_NODE_ID = 'n-e20003'
BLOCK_TO_REMOVE = 'n-1AItUD'

# 2. Access the properties
data = my_sm.properties
target_node = data['nodes'].get(TARGET_NODE_ID)

if target_node and 'children' in target_node:
    # 3. Use a list comprehension to filter
    # This creates a NEW list excluding the unwanted item.
    # It acts as a safe "remove" and ensures the property is reassigned.
    target_node['children'] = [
        child_id for child_id in target_node['children'] 
        if child_id != BLOCK_TO_REMOVE
    ]

my_sm.save()




0 Kudos
SaraJL
by
Frequent Contributor

Excellent and thank you so much! I'll try running this code. 

Thank you again for the help!

 

0 Kudos