Forum

Thread tagged as: Question, Problem

Why is there a delete button to the far right of my home page?

I'm updating one of my Perch-enabled client websites. I decided to remove a Perch region from the home page. When I went back into the Perch desktop I also removed the Perch region that I deleted.

All was fine until I saw the option to delete the Home page, so without thinking I did. When I tried to access my client's website I couldn't. Upon further review I discovered that when I pressed the delete button in Perch to delete the home page it did just that. It deleted my index.php file.

I've since restored everything, but I'm confused as to why there is a red delete button to the far right of my Home Page in the Perch dashboard, even though there are shared Perch regions on the home page. And if deleting the home page is that catastrophic, why is that even an option?

Please help me understand all of this. Thanks!

Kelly Crossley

Kelly Crossley 0 points

  • 6 years ago
Rachel Andrew

Rachel Andrew 394 points
Perch Support

If you remove all of the Perch Regions from a page then you, as the Primary Admin are able to delete the page. We assume that a Primary Admin is not going to destroy their own website, and in order to allow you to build sites we have to give you the ability to do all kinds of things that we wouldn't give to a regular content editor.

Shared Regions are no longer part of that page and so you can delete a page that includes Shared Regions.

Okay, that makes sense. I'm glad I followed your advice and always keep a backup copy before making any major changes.

If you want to stop the actual page being deleted from the server, put this in perch/config/config.php ...

define('PERCH_DONT_DELETE_FILES', true);

Sweet! Thanks Graham.

Graham, Is it possible to prevent specific pages from being deleted?

I'm afraid I don't have an answer for that. Sorry.