Search the Community
Showing results for tags 'trash pages'.
-
So I went to revisit a project that I put on hold and was met with the following error when trying to trash a page "Operator '&' is not supported for 'status' in ../wire/core/PageFinder.php: 2211 else if(!$database->isOperator($operator)) { throw new PageFinderSyntaxException("Operator '$operator' is not supported for '$field'."); } I have searched through my templates just to make sure I didn't do anything screwy, but I have no clue why this error is being generated. I can individually delete an item from the trash, but I cant empty the entire trash.
-
- mamp
- trash pages
-
(and 1 more)
Tagged with:
-
Hi all, I'm struggling in putting together a process module. I want to trash all pages that belong to a specific user after the user has been deleted. I found one related thread by onjegolders where he is doing things the other way around. In my case I need a process module that hooks after user delete. And I would like to use the wire/modules/Process/ProcessPageTrash.module. It is my first time creating a pw process module. I have read through the basics of creating modules including the wiki article and looked at the code of ProcessPageTrash.module. But I'm having a hard time putting things together. This is what I've got so far: class ProcessCleanupUserPages extends Process { public static function getModuleInfo() { return array( 'title' => 'Cleanup User Data', 'version' => 0.1, 'summary' => 'Deletes all pages that where created by a user after user has been deleted', 'singular' => true, 'permanent' => false, 'permission' => 'user-admin', 'requires' => 'ProcessPageTrash', 'autoload' => "process=ProcessPageList", // What to add here - autoload only on user list page ); } public function init() { $this->users->addHookAfter('delete', $this, '___execute()'); // is this correct? } public function ___execute() { //get user ID $userID = $this->id or $event->id // How to get the user ID? //get all pages that were created by the deleted user $userPages = $pages->get("created_users_id={$userID}"); // syntax for trash pages - call module ProcessPageTrash on $userPages } protected function render() { // print out message to admin after pages are successfully trashed } } ?> I added comments with "???" where I don't know exactly what to do. Any help would be much appreciated. Thank you.
- 14 replies
-
- Trash pages
- user
-
(and 2 more)
Tagged with: