hellomoto Posted November 27, 2016 Posted November 27, 2016 I cannot manage to delete this page upon uninstallation of a Process module I have that was working previously. I thought the only difference would be that I added `namespace ProcessWire;` to the start of the module PHP, however I've tried without it and still I get Quote ProcessWire: ProcessModule: This page may not be deleted It is an admin page. Right now I have $get = 'template=admin, parent!=trash, name=importall, include=all'; $gp = wire('pages')->get($get); if($gp->id) { wire('log')->save($log, "$gp->id".get_class($gp).__NAMESPACE__); $gp->delete(); if(!wire('pages')->get($get)->id) wire('log')->save($log, "Deleted Imports page."); } previously $gp = $this->pages->get('template=admin, parent!=trash, name=importall'); if($gp->id) { $this->pages->delete($gp, true); $this->log->save($log, "Uninstalled ". get_class()); } Why will it no longer delete? I can't even do so by the GUI.
hellomoto Posted November 27, 2016 Author Posted November 27, 2016 The page is not deleteable, but I am logged in as superadmin.
BitPoet Posted November 28, 2016 Posted November 28, 2016 Could it be that the page has set a status that prevents deletion like Page::statusSystem? In that case, removing the status flag before deletion should make it work. This can be seen in the "Settings" tab. 2
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now