grav-plugin-api icon indicating copy to clipboard operation
grav-plugin-api copied to clipboard

fix: prevent pages using an invalid template

Open Regaez opened this issue 5 years ago • 0 comments

At the moment, you can make a PATCH or POST request and set a page to use a non-existent page template. This would cause a twig rendering error and break the page.

We should validate that the template can be used (based on the currently active theme?) when attempting to change this, and throw a 400 Bad Request if the new template is invalid.

Regaez avatar Aug 04 '19 20:08 Regaez