Automattic / newspack-plugin

An advanced open-source publishing and revenue-generating platform for news organizations.

Home Page:https://newspack.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Prevent unpublishing of essential pages

tmmbecker opened this issue · 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.