breaking single page display when changing slug or moving

Permalink 1 user found helpful
Hello,

When I try to change the slug of a single page (created manually view + controller), it breaks the whole page, it only displays header and footer, it seems the page is no more linked to the file. And there is no way to roll back. If I remove the page and install it again, it works, but then I change the slug and... it breaks again!

Any idea?

Thanks

 
hutman replied on at Permalink Reply
hutman
If you're going to change the slug of this page you need to change the name on the PHP files too, otherwise they don't match up, causing the issue you are seeing.
sev replied on at Permalink Reply
Thank for your answer.
Are you sur? Because the documentation says the files need to use "_" my_page.php but I want the slug to be "my-page". If I rename the file, then I'm not compliant with the documentation.
Moreover, why do they allow to change the slug in the backoffice, if you have to change the file name?
If you are right, then there is something wrong with concrete5
hutman replied on at Permalink Reply
hutman
If you want your page to be /my-page you would have these two files

controllers/single_page/my_page.php
single_pages/my-page.php

This works for 5.8.1 for sure.
sev replied on at Permalink Reply
Actually I managed to do it by recreating the tree (deleting pages + create them + change slug), without changing the code or the files name.
But now, new error when I add the single page in the dashboard of my test website: "That specified path doesn't appear to be a valid static page." I don't know why because it works on my local environment....