Esri / storymap-journal

The Story Map Journal is ideal when you want to combine narrative text with maps and other embedded content.
Apache License 2.0
99 stars 79 forks source link

Twitter link referencing old name of app- how to change? #51

Closed upcamogie closed 8 years ago

upcamogie commented 8 years ago

I am looking at the 'share on twitter' links for my app and I notice that before the actual URL, which looks good, the name of my app is not correct. I cannot find where in the application the old name of my app is still referenced.

Example- the twitter link that is generated is here: 2016 CLRP test http://my.app.com/ #storymap

the name of my app is not "2016 CLRP Test"-- that was the name of my story map that I initially created on AGOL and have since renamed. I looked in the index, config files, etc and cannot find any reference to this ghost of a name. And my AGOL content does not have that name anymore either. I am using this map journal app that references my AGOL story map so I can still edit it online in the builder. everything seems cool except this weird thing.

Ideas? bug? help! I'd like to use these share links on my app but want the title to be obviously correct. thanks

glazou commented 8 years ago

Sorry about this issue. We are going to fix it for next release.

If you are already hosting the application on your own server, this is a simple fix, you can modify the code yourself by editing the following line https://github.com/Esri/map-journal-storytelling-template-js/blob/master/src/app/storymaps/tpl/core/WebApplicationData.js#L141 and replacing it with if ( this.getStorySections().length > 0 )

If you are not hosting the application, you can edit the data manually through the following application: https://ago-assistant.esri.com/ This lets you edit the item in your ArcGIS Online account, you have to be careful to not make invalid edit that could compromise the item. If you find your Journal and scroll down you will see a title properties that is used on Twitter

image

glazou commented 8 years ago

This bug will be fixed with the next release that is currently planned for deployment in ArcGIS Online on February 29th.

upcamogie commented 8 years ago

thx for the info. I will use one of the methods you describe until the next release (have a couple different versions, hosted and on ArcGIS Online)

upcamogie commented 8 years ago

update-- cannot edit JSON for the story map in AGO assistant....seems weird. I can edit other content but seemingly not apps. I posted this issue on the AGO assist Github too but wanted to say it here since this was a suggestion for a solution to my bug issue.

I am using the version of the app that lets you use your ArcGIS online story map within the hosted story map app template, so i do not have the file you mention editing (webApplicationData.js)

glazou commented 8 years ago

Sorry to hear. Hope this will get fixed soon. On apps that you are hosting, if you want to modify the source code you have to follow the following procedure https://github.com/Esri/map-journal-storytelling-template-js#environment-setup then https://github.com/Esri/map-journal-storytelling-template-js#how-to-build-application-from-the-source-code

Then you will see the full source code and the file WebApplicationData.js and will build the application to create a version that you can deploy on your own server. There is a few steps but only one program to install on your computer.

upcamogie commented 8 years ago

@glazou A Twitter related question so I thought I would ask here... I wanted to add/change the #storymaps hashtag and I see the code in the following locationhttps://github.com/Esri/map-journal-storytelling-template-js/blob/master/src/app/storymaps/common/utils/SocialSharing.js

Is this ability to change the social sharing only in the full source code? I still have not done the procedure you described above because I want to continue to edit my story map via the builder on AGOnline, so I only have the 'limited' download. If I wasn't so far into this app to be scared of screwing it up, I would get the full source code, but was not clear if I still could edit online and host without losing the changes I made to the config.js and index re: my proxy. thanks

glazou commented 8 years ago

hey, yes I confirm editing that file is the only way to change the hashtag. We will make that configurable one day through config.js. I also config, that deploying the downloadable version or source code version while you are building the story with the Online version is not an issue as they will all reference the same appid. There is no risk of corrupting the story with a custom deployment until you open the builder and tweak the builder source code.

upcamogie commented 8 years ago

thanks for the info. Definitely will be watching for that ability in the config.js as I like to be as little as a developer as possible to limit my risk of corruption! I'll play with this though (prob with a copy of my app)

upcamogie commented 8 years ago

I know this is closed but I hope you still get notifications.... I updated my app to use the new 1.7 build and I notice there is 2 spaces between the name of my web map and the Twitter URL. I have not changed anything in my web map with regards to map name (I had originally had to modify in AGO) - I only made changes to the index.html and config.js to alter my proxy rules to be in the right place (easier in the new build, thanks). Any ideas?

Its not critical but it looks weird to have spaces - this image is from the new app image And this is how it used to look image

glazou commented 8 years ago

Sorry about this and thanks for reporting. This looks like a bad regression from that fix. I will take care next release and opened another issue that described a workaround https://github.com/Esri/map-journal-storytelling-template-js/issues/58