statamic / v2-hub

Statamic 2 - Feature Requests and Bug Reports
https://statamic.com
95 stars 5 forks source link

Saving routes from the cp #2410

Closed freshface closed 5 years ago

freshface commented 5 years ago

Describe the bug When saving the routes the yaml file is not correct and gives on error on the frontend. It adds single quotes to the empty { }

After saving:

routes: '{  }'
redirect: '{  }'
vanity: '{  }'

As it should be:

routes: {  }
redirect: {  }
vanity: {  }

To Reproduce Steps to reproduce the behavior:

  1. Save the routes from the CP

Additional context Error:

Screenshot 2019-06-12 at 22 38 51
studio1902 commented 5 years ago

Yes, this is a pretty annoying bug. You'll encounter it soon when you just start with Statamic and then you don't know what to do.

jackmcdade commented 5 years ago

What version are you on? I can't recreate this in 2.11.12.

studio1902 commented 5 years ago

Same version! Is this helpful? https://cvws.icloud-content.com/B/ASX0jVeRHO65M9igDAsmz7KG7_VwAZqi8WjGNBjPMq78olFMRCp32slN/statamic-saving-routes-from-the-cp.mov?o=AgDJ0-0Ipptb-gYEPIiLjuhpbnW7kjnZKjAecqoDJ6Pi&v=1&x=3&a=CAogoW8oDUtHbRio78yevedLqNDQd3LK91wknOtkwHWNniYSHRCGhuDJuS0Ypv2WyrktIgEAUgSG7_VwWgR32slN&e=1561644613&k=rQ9_2uUwRgOsq2e7dAl5lg&fl=&r=dafb35cc-c866-4fd9-bcd4-b167e9b66138-1&ckc=com.apple.clouddocs&ckz=com.apple.CloudDocs&p=18&s=E62UqCoqrU35gRKSQswAqLaZNyI&cd=i

jackmcdade commented 5 years ago

Ahh, very helpful, thank you. You need to load the form with a null routes field. Got it. 👍

studio1902 commented 5 years ago

Cool!