NUKnightLab / NUKnightLab/StoryMapJS

Legacy Mapbox StoryMaps cannot be edited

Open
#408 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
248
Forks
61
Avg merge
1m
Merged PRs (30d)
1

Description

I believe this traces back to the closing of #400 (which fixed #274)

I have an old map in my account which I just mess with for testing. When I go to open it now, I get an error

https://github.com/NUKnightLab/StoryMapJS/issues/new

The old map_type was mapbox:censusreporter.map-j9q076fv When this goes through EditorMap.js it hits an error (at line 306) because this value doesn't match expectations about how values beginning with mapbox: should be structured.

https://github.com/NUKnightLab/StoryMapJS/blob/8b72cd31b66b592f3844e739e167f5efaab11eb7/static/js/EditorMap.js#L284-L320

I believe this also came up in Zendesk #5944.

The fix would be to include a branch when the map_type begins with mapbox: to preserve old behavior while supporting the new form of the URL they provide.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in static/js/EditorMap.js around lines 284-320 and trace how the legacy map_type value mapbox:censusreporter.map-j9q076fv is parsed. Add the requested compatibility branch while preserving support for the new Mapbox URL form; done means the old map can be opened in the editor without the error.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.