Terrastories / terrastories

Terrastories is a geostorytelling application for mapping, managing and sharing place-based stories.
https://terrastories.app
MIT License
316 stars 157 forks source link

[Bug][Rails] Updating Theme fields causes map to not load #603

Closed rudokemper closed 3 years ago

rudokemper commented 3 years ago

Describe the bug Terrastories Theme has the ability to add a custom Mapbox map and token per community. As soon as you modify any of the other fields in the Theme (like adding a custom logo), but leave the two map fields alone, it causes the map to not work.

To Reproduce Steps to reproduce the behavior:

  1. Go to the map with an out of the box Terrastories install. Confirm that it's working.
  2. As an Admin user log in and go to the Theme menu.
  3. Add a custom sponsor logo.
  4. Don't do anything to the two map fields. And click Update Theme.
  5. Now to go to the map. It will load blank and throw the errors in the screenshot below.

Expected behavior If nothing is added to the Mapbox fields in Theme, it will just stick with the default map and key.

Screenshots image image

rudokemper commented 3 years ago

@lauramosher I expect this might be a bug from the December work, and an easy fix :)

lauramosher commented 3 years ago

Huh, I thought I tested this. I must've messed something up somewhere.