Add validation for empty layers. Fix error when editing an invalid form. Add methods to fix the map link parameters for map stories