Results 1 to 4 of 4

Thread: Vardef Hell!!!

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

    Default Vardef Hell!!!

    I am trying to recover from the shrapnel laden reality of a custom module (module builder) installation gone awry. I tried installing the module which exploded in my face in the middle of the install through module loader. I believe it had something to do with the excessive use of _ in the table definitions, but it's hard to tell.

    Anyway the module did not completely or even moderately uninstall when because it never completed installing. So I had to get my hands dirty and do the deed manually. I have successfully completed this kind of bomb squad mission before but this time I am having a problem. To the best of my knowledge all pieces of the module have been removed including all referneces in:

    ./custom/application/Ext/Include/modules.ext.php
    /custom/modules/<module>

    Related Modules:
    /custom/Extension/modules/Accounts/Vardefs
    /custom/Extension/modules/Opportunities/Vardefs

    There was probably more as I went picking around...

    The problem is I am still getting an error when doing a rebuild saying the Vardefs and the database don't match and it wants to create some tables that I removed. Here is the output:
    Code:
    /* Table : a_ord_apprader_accounts */
    /* MISSING TABLE: a_ord_apprader_accounts */
    CREATE TABLE a_ord_apprader_accounts (id varchar(36)  NOT NULL ,date_modified datetime  NULL ,deleted bool  DEFAULT '0' NOT NULL ,a_ord_appraisal_order_ida varchar(36)  NULL ,accounts_idb varchar(36)  NULL  , PRIMARY KEY (id),   KEY a_ord_apprader_accounts_ida1 (a_ord_appraisal_order_ida),   KEY a_ord_apprader_accounts_idb2 (accounts_idb),   KEY a_ord_apprader_accounts_idc3 (a_ord_appraisal_order_ida, accounts_idb)) CHARACTER SET utf8 COLLATE utf8_general_ci;
    /* Table : a_ord_apprapportunities */
    /* MISSING TABLE: a_ord_apprapportunities */
    CREATE TABLE a_ord_apprapportunities (id varchar(36)  NOT NULL ,date_modified datetime  NULL ,deleted bool  DEFAULT '0' NOT NULL ,a_ord_appraisal_order_ida varchar(36)  NULL ,opportunities_idb varchar(36)  NULL  , PRIMARY KEY (id),   KEY a_ord_apprapportunities_ida1 (a_ord_appraisal_order_ida),   KEY a_ord_apprapportunities_idb2 (opportunities_idb),   KEY a_ord_apprapportunities_idc3 (a_ord_appraisal_order_ida, opportunities_idb)) CHARACTER SET utf8 COLLATE utf8_general_ci;
    /* Table : a_ord_apprasal_accounts */
    /* MISSING TABLE: a_ord_apprasal_accounts */
    CREATE TABLE a_ord_apprasal_accounts (id varchar(36)  NOT NULL ,date_modified datetime  NULL ,deleted bool  DEFAULT '0' NOT NULL ,a_ord_appraisal_ida varchar(36)  NULL ,accounts_idb varchar(36)  NULL  , PRIMARY KEY (id),   KEY a_ord_apprasal_accounts_ida1 (a_ord_appraisal_ida),   KEY a_ord_apprasal_accounts_idb2 (accounts_idb),   KEY a_ord_apprasal_accounts_idc3 (a_ord_appraisal_ida, accounts_idb)) CHARACTER SET utf8 COLLATE utf8_general_ci;
    /* Table : a_ord_apprapportunities */
    /* MISSING TABLE: a_ord_apprapportunities */
    CREATE TABLE a_ord_apprapportunities (id varchar(36)  NOT NULL ,date_modified datetime  NULL ,deleted bool  DEFAULT '0' NOT NULL ,a_ord_appraisal_ida varchar(36)  NULL ,opportunities_idb varchar(36)  NULL  , PRIMARY KEY (id),   KEY a_ord_apprapportunities_ida1 (a_ord_appraisal_ida),   KEY a_ord_apprapportunities_idb2 (opportunities_idb),   KEY a_ord_apprapportunities_idc3 (a_ord_appraisal_ida, opportunities_idb)) CHARACTER SET utf8 COLLATE utf8_general_ci;
    Where could the Vardefs be hiding? I have cleared the cache many times, but the error remains every time I do a quick repair/rebuild.
    Development Setup
    Sugar 5.0.0c
    Fedora Core 7
    Plesk 8.3
    PHP 5.2.4-1.fc7
    MySQL 5.0.45.fc7

  2. #2
    SugarDev.net is offline Sugar Community Member
    Join Date
    Feb 2008
    Posts
    1,401

    Default Re: Vardef Hell!!!

    Code:
    grep -ri a_ord_apprapportunities .
    Developers go here
    Businesses go there (Dutch)

    Modules:
    SugarDev.net Developer Tools | Config | Dutch Language Pack
    "Nothing gets fixed unless there is a bug"

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

    Default Re: Vardef Hell!!!

    Thank you. I am embarrassed to say that in all the time I have working on linux, I really have used grep very little. I see now it is a tool I need to get more familiar with. 3 hours of searching resulted in nothing. 10 seconds with grep and I found the offending files. For documentation sake and for anyone else who may be searching for module fragments the listed grep command is irreplaceable. Oh and the files were in:

    ./metadata/

    Deleted the files, re-ran quick repair/rebuild and the mess is cleaned up. Now to figure out what went wrong.

    Thanks again for the help.
    Development Setup
    Sugar 5.0.0c
    Fedora Core 7
    Plesk 8.3
    PHP 5.2.4-1.fc7
    MySQL 5.0.45.fc7

  4. #4
    SugarDev.net is offline Sugar Community Member
    Join Date
    Feb 2008
    Posts
    1,401

    Default Re: Vardef Hell!!!

    grep is your buddy
    Developers go here
    Businesses go there (Dutch)

    Modules:
    SugarDev.net Developer Tools | Config | Dutch Language Pack
    "Nothing gets fixed unless there is a bug"

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. vardef cache
    By salimmohd82 in forum Developer Help
    Replies: 2
    Last Post: 2008-03-28, 10:34 PM
  2. parameter "function" in vardef. How does it work?
    By gunni in forum Developer Help
    Replies: 4
    Last Post: 2007-07-08, 09:51 AM
  3. vardef audited
    By strafico in forum Developer Help
    Replies: 1
    Last Post: 2007-03-30, 02:52 PM
  4. Replies: 0
    Last Post: 2006-07-17, 04:11 PM
  5. vardef in 3.5
    By 001 in forum Developer Help
    Replies: 0
    Last Post: 2005-08-30, 03:33 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
  •