Automattic/newspack-plugin

Prevent unpublishing of essential pages

tmmbecker opened this issue · 1 comments

Is your feature request related to a problem? Please describe.

In #1030, we added prevention from deletion of pages which are considered "essential" to Newspack sites, if they exist. This includes:

The homepage
The blog posts page
WooCommerce pages: My Account, Shop, Cart, Checkout, View Order, Terms, and Privacy Policy

After this change, no one (not even super admins) will be able to delete the above pages. In order to delete an essential page, another page must be assigned the essential role first.

However, these pages can still be set to draft. In the case of the home page, if the page is set to draft, then the site returns a 404, resulting in a site down situation.

Describe the solution you'd like

For these same essential pages, we should prevent from being set to a draft state.

Closed in #2307.