FacilMap / facilmap

FacilMap is a privacy-friendly, open-source versatile online map that combines different services based on OpenStreetMap and makes it easy to find places, plan trips and add markers, lines and routes to custom maps with live collaboration.
https://facilmap.org/
GNU Affero General Public License v3.0
317 stars 21 forks source link

changing the read-only link URL to something else displays a map without any data (even if there's any available.) #150

Closed govvin closed 3 years ago

govvin commented 3 years ago

Changing the admin and edit URLs work fine for me, but when I change the read-only URL it points to an empty map.

I expected that it will point to the same map, in a read-only mode.

govvin commented 3 years ago

5/2, update.

I initially reported that when I changed the read-only link, it points to a new map. That's apparently incorrect.

What appears to have been happening is that it doesn't display any data. I can view the custom text and links in the legend box, but view none of the data.

cdauth commented 3 years ago

I can reproduce the problem. It seems that somehow the map objects are not updated to belong to the new URL. Since FacilMap internally uses the read-only URL for associating map objects with a map, it also means that when you change the read-only URL, the map objects are also missing on the writable/admin URLs. To get them back, you can change the read-only URL back to the original value.

I will try to investigate and fix this as soon as possible.

cdauth commented 3 years ago

This should be fixed now. For some reason the foreign key constraints were not in the database. I wonder if this has actually ever worked. Thanks for reporting!

If you lost any data because of this, please let me know.

govvin commented 3 years ago

Thank you for fixing it @cdauth

I confirm that it now works as expected, and happily, I don't see any data loss.