Results 1 to 6 of 6

Thread: Manually remove Module

  1. #1
    Iggby's Avatar
    Iggby is offline Sugar Community Member
    Join Date
    Feb 2008
    Location
    Huntingtonton Beach, Ca
    Posts
    101

    Default Manually remove Module

    I built a module (sugar 5.0.b) in module builder, then realized I was better off modifying the opportunities module instead. I deleted the module in module builder and uninstalled it through module loader.

    Problem is it didn't uninstall, and has now broken the Tasks relationship which is giving me the following error.


    Warning: array_slice() [function.array-slice]: The first argument should be an array in

    Every time I try to remove the relationship via the following files:

    /custom/modules/Tasks/Ext/layoutdefs
    /custom/modules/Tasks/Ext/vardefs

    any changes I make are just overwritten and the file is back to it's original state when I check it again.

    How can I just permanently remove the module.

  2. #2
    ptemplin7 is offline Sugar Community Member
    Join Date
    Jun 2007
    Location
    Puget Sound Washington
    Posts
    380

    Default Re: Manually remove Module

    Welcome to Sugar 5.0 bug. This is well documented elsewhere.

    In short you will need to delete the directories for that module in crm/modules and in the crm/custom folders.

    Make sure any other change to the tasks etc has also been deleted. Look for toher references to that module you deleted in the custom directory. There are likely a few.

    Good luck, I've already had to do this once it takes some time but eventually you can delete all records to it.

    Paris

  3. #3
    Iggby's Avatar
    Iggby is offline Sugar Community Member
    Join Date
    Feb 2008
    Location
    Huntingtonton Beach, Ca
    Posts
    101

    Default Re: Manually remove Module

    Thanks.

    I was hoping for a "cleaner" solution as there will no doubt be problems doing it this way. I am a bit concerned about breaking something in the process. Based on the lack of responses to mine and other similar threads on a solution to this problem yours was the answer I expected. I hoped maybe I had missed a new technique to fix this problem.

    I guess I will just have to start chopping and hope I don't break something in the process.

  4. #4
    Iggby's Avatar
    Iggby is offline Sugar Community Member
    Join Date
    Feb 2008
    Location
    Huntingtonton Beach, Ca
    Posts
    101

    Default Re: Manually remove Module

    Ok. Now I may have done it. I moved my custom module out of the Sugar tree and tried rebuilding to get rid of it, and the following errors are comming up durring the rebuild. When I go to the home page I get SQL errors. Any suggestions on how to correct these errors? I dont want to just start bashing around. I am guessing I need to remove some references to the module in the sql db.

    Warning: require_once(modules/loans_Loans/loans_Loans.php) [function.require-once]: failed to open stream: No such file or directory in /var/www/VantageCRM/modules/Administration/repairDatabase.php on line 101

    Fatal error: require_once() [function.require]: Failed opening required 'modules/loans_Loans/loans_Loans.php' (include_path='/var/www/VantageCRM/include/..:.:/usr/share/php:/usr/share/pear') in /var/www/VantageCRM/modules/Administration/repairDatabase.php on line 101

    The offending code in repairDatabase.php seems to be:

    Code:
    for each ($beanFiles as $bean => $file) (
    require_once ($file);
    $focus = new $bean ();
    Any suggestions as to what I need to remove so as to not call this for the module that I am removing?
    Can I remove the database tables to the module without breaking other things?
    Last edited by Iggby; 2008-04-03 at 03:55 AM.

  5. #5
    Iggby's Avatar
    Iggby is offline Sugar Community Member
    Join Date
    Feb 2008
    Location
    Huntingtonton Beach, Ca
    Posts
    101

    Default Re: Manually remove Module

    Well just in case anyone is interested the code in question referred to custom/application/Ext/Include/modules.ext.php

    I removed referrence to the offending module and that solved my sql problems. Alas it did not solve the issues with the original error messages showing up on the Task detailview.

  6. #6
    ptemplin7 is offline Sugar Community Member
    Join Date
    Jun 2007
    Location
    Puget Sound Washington
    Posts
    380

    Lightbulb Re: Manually remove Module

    Hi,

    Looks like you are having fun! Use your PHP tool and remove the DB tables for the loan module.

    Also, Make sure to remove the module from the modules directory, Check the metadata directory if you had a relate field (probably so since Tasks is broken) make sure to remove the link in the metadata. This is the many to many relationship setup.
    Check the custom/modules directory to make sure stuff isn't there, and remove stuff from the custom/Extension/... directories.

    That error looks to be a reference error. can you grep and find the module referenced?
    Also, check the tasks directories in the custom folder there is usually a link to the relates there as well. Remember to check and edit if necessary all vardef.ext.php, vardef.php, lang_en_us.ext.php, and that third directory (forgot the name!) my box is down at the moment.

    Sounds like you are close but my guess is the relate in the metadata setup that is confusing tasks and Sugar.

    If I think of something else I'll let you know. Will not be back to Sugar fixes until Friday.

    Good luck, Paris

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Manually Remove Module
    By fbnewtz in forum Help
    Replies: 6
    Last Post: 2010-03-26, 05:25 PM
  2. Module Builder
    By Olavo in forum Downloads
    Replies: 418
    Last Post: 2009-02-26, 06:36 AM
  3. Replies: 2
    Last Post: 2008-01-11, 12:30 PM
  4. Replies: 0
    Last Post: 2007-02-20, 11:00 AM
  5. Replies: 1
    Last Post: 2006-09-11, 03:38 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •