Results 1 to 6 of 6
Like Tree1Likes
  • 1 Post By rafael.q.g@hotmail.com

Thread: clone one sugar's module

  1. #1
    garciasanchezdaniel's Avatar
    garciasanchezdaniel is offline Sugar Community Member
    Join Date
    Aug 2011
    Location
    Spain
    Posts
    403

    Default clone one sugar's module

    Hello!

    What is the safest way to clone one sugar's module?

    I need to clone two modules: documents, and bugs, and if is possible including relation between documents-documents_revisions

    Best regards, Daniel

  2. #2
    rafael.q.g@hotmail.com's Avatar
    rafael.q.g@hotmail.com is offline Sugar Community Member
    Join Date
    Jun 2011
    Location
    Florianópolis - Brazil
    Posts
    782

    Default Re: clone one sugar's module

    Hi Daniel,

    I don't know whether the way I will describe here is the easiest way, but is safer and works very well.
    1. Copy the folder of original module from /modules and renamed the folder name and all its references to new module name.
    2. Do the same for folder /custom/modules and for /custom/Extension/modules
    3. Under directory \custom\Extension\application\Ext\Include add a new file to include your new module in module list.
    4. Pay attention in files under [custom]/metadata folder, you should also duplicated and adjust the files which detail modules relationships.
    5. Now run a repair/rebuild and execute the sql statements.
    Rafael Queiroz Gonçalves
    Advanced OMG UML Certified Professional
    Sun Certified Enterprise Architect for the Java Platform
    Sun Certified Programmer for the Java 2 Platform
    IBM Certified Advanced Application Developer - Lotus Notes and Domino
    IBM Certified Application Developer - IBM WebSphere Portlet Factory
    Computer Science Mastering / UFSC - PPGCC

  3. #3
    garciasanchezdaniel's Avatar
    garciasanchezdaniel is offline Sugar Community Member
    Join Date
    Aug 2011
    Location
    Spain
    Posts
    403

    Default Re: clone one sugar's module

    Hello Rafael! Thanks very much for your help.

    I just tried do that you say, but I am doing something wrong, because when I run a repair/rebuild, when sugar rebuilds relationships, then appears a fatal error that says: "Class Documents2" not found in Administration/RebuildRelationship...(I want that my new module's name be Documents2) I don't understand well two points:

    1. What do you want to say when you say that I must rename all its references to new module name? what are these references?

    4. I don't know how do this.

    I have sugarcrm 6.1.7 (Build 5875)

    Sorry for my ignorance.

    I hope your help, Daniel
    Last edited by garciasanchezdaniel; 2012-01-23 at 08:23 AM.

  4. #4
    gauts is offline Sugar Community Member
    Join Date
    Aug 2007
    Location
    France
    Posts
    27

    Default Re: clone one sugar's module

    With module builder you can create new modules based on models such as documents or bugs.
    Gauthier GENEAU
    CIGO SAS
    10 grand rue 68280 Logelheim (France)
    http://www.cigo-developpement.fr

  5. #5
    garciasanchezdaniel's Avatar
    garciasanchezdaniel is offline Sugar Community Member
    Join Date
    Aug 2011
    Location
    Spain
    Posts
    403

    Default Re: clone one sugar's module

    Hey! Thanks for your replies.

    I think that finally I will create these two modules through module builder, this is, by hand, because I don't understand well the other ways...but I'd like know one thing more, if is possible when creating a new module with it a name without the format alphanumeric key_modulename. For example, if I could give to a new module documents the name documents2, not alphanumeric key_documents2

    Regards, Daniel

  6. #6
    rafael.q.g@hotmail.com's Avatar
    rafael.q.g@hotmail.com is offline Sugar Community Member
    Join Date
    Jun 2011
    Location
    Florianópolis - Brazil
    Posts
    782

    Default Re: clone one sugar's module

    Hi Daniel,

    As you already found a solution for your issue, I will not detail explanations about topics 1 and 4.
    About take out the key from the front of your module name, yes it is possible.

    1. You should not deploy your module from module builder. You should export it from module builder as a zip file, and then later load it from module loader.

    2. After you export your zip file, you have to configure the manifest.php file to rename your module that currently has the "key" in front of its name.

    3. You have to take a look over all modules files to check whether there is some reference to old module name (with key on front), and then rename it to new name.

    4. After create a new zip package based on your module files, and load it from module loader.

    Now it should be done.
    Rafael Queiroz Gonçalves
    Advanced OMG UML Certified Professional
    Sun Certified Enterprise Architect for the Java Platform
    Sun Certified Programmer for the Java 2 Platform
    IBM Certified Advanced Application Developer - Lotus Notes and Domino
    IBM Certified Application Developer - IBM WebSphere Portlet Factory
    Computer Science Mastering / UFSC - PPGCC

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 0
    Last Post: 2010-05-14, 11:38 AM
  2. How to Clone the Contact Module?
    By ssmeredith in forum Help
    Replies: 2
    Last Post: 2009-04-08, 08:49 PM
  3. [Module Builder] Planned 'Clone module' command
    By andy60 in forum Developer Help
    Replies: 1
    Last Post: 2007-09-10, 03:40 PM
  4. Replies: 2
    Last Post: 2007-08-02, 04:54 PM
  5. Clone module with ModuleBuilder
    By sanocli in forum Help
    Replies: 0
    Last Post: 2007-07-03, 09:15 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
  •