Results 1 to 6 of 6

Thread: Deleting files after deploying a custom module

  1. #1
    niksata is offline Junior Member
    Join Date
    Jan 2012
    Posts
    2

    Default Deleting files after deploying a custom module

    Hi there,

    I'm using SugarCRM Community Edition 6.4.0, and I have a problem when I'm trying to use logic_hooks.
    I created a logic_hooks.php script in which the event, the reference to the PHP script and etc. are described, as shown in the Guide. I put this file into the folder custom/modules/<MyCustomModule> folder.
    However, when I deployed the module by using the Module Builder, I discovered that the file logic_hooks.php had been erased from custom/modules/<MyCustomModule>. The same happened with the controller.php script, located in the same folder.

    Any information? Is there something I'm not aware of?
    Thanks in advance
    Niksa

  2. #2
    solid's Avatar
    solid is offline Sugar Community Member
    Join Date
    May 2010
    Location
    Canada
    Posts
    35

    Default Re: Deleting files after deploying a custom module


  3. #3
    eggsurplus's Avatar
    eggsurplus is offline Sugar Community Member
    Join Date
    Dec 2005
    Location
    Minnesota
    Posts
    2,343

    Default Re: Deleting files after deploying a custom module

    Best practice is to only use Module Builder initially as it does a great job of getting you going as fast as possible. After deploying once stick with using Studio instead as that does a great job of maintaining your customizations. Module Builder has had a history of overwriting your customizations for some time now. At the very least a warning should come up.

  4. #4
    solid's Avatar
    solid is offline Sugar Community Member
    Join Date
    May 2010
    Location
    Canada
    Posts
    35

    Default Re: Deleting files after deploying a custom module

    Quote Originally Posted by eggsurplus View Post
    Best practice is to only use Module Builder initially as it does a great job of getting you going as fast as possible. After deploying once stick with using Studio instead as that does a great job of maintaining your customizations. Module Builder has had a history of overwriting your customizations for some time now. At the very least a warning should come up.
    The problem with Studio is that the customizations are stored in the DB, while Module Builder store everything in files. Also, Studio add a new table instead of modifying the table wanted itself. If you want to have your Sugar under source control, Studio is not a good choice.

    All the modules created with Module Builder here are maintained using it. We only use Studio to customize the Sugar modules, since there is no other way to make them.

  5. #5
    eggsurplus's Avatar
    eggsurplus is offline Sugar Community Member
    Join Date
    Dec 2005
    Location
    Minnesota
    Posts
    2,343

    Default Re: Deleting files after deploying a custom module

    Oh I completely agree. This is why I'd suggest to then use the Extensions directory to make additional modifications to your module's schema. Great thing about it is works well with code repositories and is easy to deploy. Just add to custom/Extension/modules/YOURMOD/Ext/Vardefs/anyfile.php. Then again it is your custom module so you could edit the modules/YOURMOD/vardefs.php to add all the fields you need. Quick Repair/Rebuild and execute the generated SQL to add your field(s). I'd highly advise against using MB for ongoing customizations. Great for proof of concepts and for getting started quickly.

  6. #6
    solid's Avatar
    solid is offline Sugar Community Member
    Join Date
    May 2010
    Location
    Canada
    Posts
    35

    Default Re: Deleting files after deploying a custom module

    Quote Originally Posted by eggsurplus View Post
    Oh I completely agree. This is why I'd suggest to then use the Extensions directory to make additional modifications to your module's schema. Great thing about it is works well with code repositories and is easy to deploy. Just add to custom/Extension/modules/YOURMOD/Ext/Vardefs/anyfile.php. Then again it is your custom module so you could edit the modules/YOURMOD/vardefs.php to add all the fields you need. Quick Repair/Rebuild and execute the generated SQL to add your field(s). I'd highly advise against using MB for ongoing customizations. Great for proof of concepts and for getting started quickly.
    Yep, doing that already, and it works like a charm. My point was that in Sugar 5.5 Module Builder was not scraping Extensions files like the Sugar 6.3 Module Builder is doing. Except for that, I have no problem to use Module Builder to make ongoing customizations.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Erased files after deploying a custom module
    By niksata in forum Developer Help
    Replies: 1
    Last Post: 2012-01-23, 03:04 PM
  2. Deleting files from custom folder
    By Ali Akbar in forum Developer Help
    Replies: 2
    Last Post: 2011-01-31, 10:33 PM
  3. Deploying custom module
    By Keyser in forum Installation and Upgrade Help
    Replies: 4
    Last Post: 2010-04-12, 08:40 AM
  4. Why does deploying Package delete custom files?
    By dvelguru in forum Developer Help
    Replies: 4
    Last Post: 2010-01-20, 06:13 PM
  5. Need help for deploying custom module
    By vivek6151 in forum Help
    Replies: 3
    Last Post: 2009-10-07, 11:28 AM

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
  •