felic Posted December 2, 2015 Share Posted December 2, 2015 Hi, i installed the core module "Comments" (with all its dependencies) several weeks ago while PW was still on 2.6.x. Meanwhile i've updated PW to 2.7.1. Now i want to uninstall/remove that module. Which fails with a "class not found" error. Error: Class 'Comment' not found (line 80 of /xxx/wire/modules/Process/ProcessCommentsManager/ProcessCommentsManager.module) // ProcessCommentsModule.module, line 80 public function init() { parent::init(); $this->statuses = array( Comment::statusApproved => $this->_('approved'), ... ); } As this is a core module it is certainly not a good idea trying to remove this by hand. So, can anybody give some advice what to do to get this module in a "uninstalled" mode again? Thx in advance. Link to comment Share on other sites More sharing options...
_NameLess_ Posted February 11, 2016 Share Posted February 11, 2016 So, did you find a solution? Got the same problem with 2.7.2 Link to comment Share on other sites More sharing options...
felic Posted February 11, 2016 Author Share Posted February 11, 2016 Unfortunately not. But i didn't dig in too deep to find the cause. Because of timelines, i just left it for now as is. Link to comment Share on other sites More sharing options...
_NameLess_ Posted February 11, 2016 Share Posted February 11, 2016 As I don't know what post fits better I decided to post updates in mine. Link: https://processwire.com/talk/topic/12194-comments-manager-module-error-usinguninstall/ EDIT/UPDATE: If you just want to delete and not use this module, you can replace a few values in the .module file, uninstall it and revert the replaced stuff. File location: \wire\modules\Process\ProcessCommentsManager\ProcessCommentsManager.module Comment::statusApproved => $this->_('approved'), Comment::statusPending => $this->_('pending'), Comment::statusSpam => $this->_('spam'), Comment::statusDelete => $this->_('delete') To the following: 1 => $this->_('approved'), 0 => $this->_('pending'), -2 => $this->_('spam'), 999 => $this->_('delete') There are 3 more "Comment::statusDelete". Just replace them with 999 and you are good to go. After this, upload the changes. You can now uninstall the module. Afterwards, just revert the changes and upload again. Clarification for the values: The "Comment"-Class is located under: \wire\modules\Fieldtype\FieldtypeComments\Comment.php There are constants declared. Have fun ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- EDIT: Kongondo pointed out our mistake. The problem is that we don't have a field for comments yet. Therefore the error fires. To uninstall: 1. Create a new field from the type "Comments". 2. Uninstall CommentsManager 3. Delete Field created in 1... 4. WIN 1 Link to comment Share on other sites More sharing options...
felic Posted February 17, 2016 Author Share Posted February 17, 2016 Great. Thanks for sharing! And honestly, i would never have considered this. 1 Link to comment Share on other sites More sharing options...
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