Results 1 to 7 of 7

Thread: subpanel issues for a related field

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

    Default subpanel issues for a related field

    Hi,

    Hopefully someone out there can figure out what is wrong. I've been banging my head trying to get these pain in the neck relate fields working. While the Wiki entry is good there always something else!

    To make a long story short, finally figured out that the module builder really stinks it up with the relate fields. That took about 4 hours to figure out. Once I deleted the module and the destroyed the relate field, redeployed the module and used studio to add a relate field finally was moving forward.

    I finally have the relationship working. I can select the Account from my custom module relate field. Finally got the subpanel to at least show on the Account page. That took lots of troubleshooting. Finally found the missing ' and several naming problems.

    Now I'm stuck because the subpanel is missing defined fields from the layoutdefs and subpanel definitions. I continue to get various errors (widget error for top button, incorrectly displayed headers, missing listed fields), Finally got the buttons to appear but they just give errors when clicked on. Such as select does not pup-up the Kids to select, Create doesn't create. So something is still wrong.

    Hope someone can figure it out. Below is the critical code. I was hoping to fully deploy on a production system today. This my last major piece of version 1.1 of customized Sugar 5.0b

    Server specs: CentOS 5, Sugar 5.0b, php 5.2.?, MSSQL 5

    Thanks for your assistance,
    Paris

    BTW, I tried to follow the Wiki and developer docs as much as possible. But with only partial success.
    I also posted this over on the developers forum. Hoping Clint or Superman or some of the other experts can help me out! I'm open to suggestions! :>

    ====================
    custom/Extension/modules/Accounts/Ext/Layoutdefs/layoutdefs.php

    $layout_defs['Accounts']['subpanel_setup']['ch123_kids'] = array (
    'order' => 99,
    'module' => 'ch123_Kids',
    'subpanel_name' => 'ForAccount',
    'refresh_page' => 1,
    'get_subpanel_data' => 'client_c',
    'title_key' => 'LBL_KIDS_SUB',
    );

    ************ client_c is the relate field in the Kids module. When I had the widget_class statements in here as directed in the Wiki. I kept getting widget error and no buttons in the subpanel.


    crm5/modules/ch123_Kids/metadata/subpanels/ForAccount.php
    <?php
    $module_name='ch123_Kids';
    $subpanel_layout = array (
    'top_buttons' =>
    array (
    0 =>
    array (
    'widget_class' => 'SubPanelTopCreateButton',
    ),
    1 =>
    array (
    'widget_class' => 'SubPanelTopSelectButton',
    'popup_module' => 'ch123_Kids',
    ),
    ),
    'where' => '',
    'list_fields' =>
    array (
    'first_name' =>
    array (
    'name' => 'first_name',
    'vname' => 'LBL_FIRST_NAME',
    'usage' => 'query_only',
    ),
    'last_name' =>
    array (
    'name' => 'last_name',
    'vname' => 'LBL_LAST_NAME',
    'usage' => 'query_only',
    ),
    'email1' =>
    array (
    'name' => 'email1',
    'vname' => 'LBL_LIST_EMAIL',
    'widget_class' => 'SubPanelEmailLink',
    'width' => '30',
    ),
    'phone_work' =>
    array (
    'name' => 'phone_work',
    'vname' => 'LBL_LIST_PHONE',
    'width' => '15',
    ),
    'edit_button' =>
    array (
    'widget_class' => 'SubPanelEditButton',
    'module' => 'ch123_Kids',
    'width' => '5',
    ),
    'remove_button' =>
    array (
    'widget_class' => 'SubPanelRemoveButton',
    'module' => 'ch123_Kids',
    'width' => '5',
    ),
    ),
    );
    ?>
    ***********At one time there was a client_c in the list. Deleted that allong the way.

    ********** Attached is what I'm getting on the screen
    Attached Images Attached Images  

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

    Default Re: subpanel issues for a related field

    Bump, is there anybody who can help with this?

    I also seem to have an issue with the le3ft hand portion associated with the Quick Create for the child module. It does weird things with the expansion of tabs! Once I go to that module mousing over the >>> to expand the tabs Puts the list in the top left hand corner of the sugar screen!!! Haven't yet checked the forums to find out what might be doing this. Any pointers?

    Thanks for your potential help. At the moment this is a show stopper for my customer and I need to get this sorted out.

    Thanks ahead of time for any suggestions and ideas,
    Paris

  3. #3
    DragonflyMaster is offline Sugar Community Member
    Join Date
    Dec 2007
    Location
    Rimini, Italy
    Posts
    1,421

    Default Re: subpanel issues for a related field

    Hi Paris,
    Here is about 2 in the morning and I'm kinda sleepy so maybe I'm not completely getting the point of your question, but...
    I would proceed this way: I'd create a new custom module in studio, so that Sugar creates for me all folders and stuff.
    Then, I would compare files for my custom module with files for a default module such as accounts or contacts (depending on which is the most similar to your custom module type (person, account, issue?))
    From this comparison something usually comes out.

    PS: 4 hours for figuring out something not documented is nothing to be ashamed of, sometimes I spend much more than that...
    What do you think the cookie monster eats ?

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

    Default Re: subpanel issues for a related field

    Thanks, Hope you get some sleep soon!

    Good idea, I probably all told have spent more like 40 hours trying to get this one thing to work over the last month or so.
    I'll give your suggestion a shot.
    The "child" is actually a custom module. I may try to blow away the DB and its values and try again also. Getting rid of the old module with the undocmented feature (ie bug) was a pain too. Suspect I have some junk left over from that as well.

    Anyway I plan to take the evening off and work on this again tomorrow or Monday.

    Are you interested in some consulting work with a Startup? They are looking for a Sugar Integrator to work with the tema he is putting together to provide a custom extension of Sugar. Upfront pay sounds low but payoff later has huge potential. I unforetunately haven't worked with Sugar long enough yet to help him out.

    Thanks Paris

    Any other ideas anyone?

  5. #5
    DragonflyMaster is offline Sugar Community Member
    Join Date
    Dec 2007
    Location
    Rimini, Italy
    Posts
    1,421

    Default Re: subpanel issues for a related field

    Quote Originally Posted by ptemplin7
    The "child" is actually a custom module. I may try to blow away the DB and its values and try again also. Getting rid of the old module with the undocmented feature (ie bug) was a pain too. Suspect I have some junk left over from that as well.
    In this case it can be useful to set up a clean new instance of sugar, to get rid of all junk which can be a pain in the neck.
    Quote Originally Posted by ptemplin7
    Are you interested in some consulting work with a Startup? They are looking for a Sugar Integrator to work with the tema he is putting together to provide a custom extension of Sugar. Upfront pay sounds low but payoff later has huge potential. I unforetunately haven't worked with Sugar long enough yet to help him out.?
    Sounds interesting
    Send me a private message to tell me more about it.
    Cheers
    What do you think the cookie monster eats ?

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

    Default Re: subpanel issues for a related field

    Thanks DragonflyMaster,

    I have sent you a private message with the contact info.

    The quick create is also broken at the moment so something is still messed up. Need to find another box to play on. May just re-install on my development box and try again!

    Thanks Paris

  7. #7
    DragonflyMaster is offline Sugar Community Member
    Join Date
    Dec 2007
    Location
    Rimini, Italy
    Posts
    1,421

    Default Re: subpanel issues for a related field

    Quote Originally Posted by ptemplin7
    Thanks DragonflyMaster,

    I have sent you a private message with the contact info.

    The quick create is also broken at the moment so something is still messed up. Need to find another box to play on. May just re-install on my development box and try again!

    Thanks Paris
    Let me know how things proceed after re-installing.
    What do you think the cookie monster eats ?

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. HOWTO - Hack Sugar to support related module info in subpanel (one-many)
    By kenneth.thorman in forum Developer Tutorials
    Replies: 35
    Last Post: 2008-06-10, 07:51 AM
  2. Replies: 2
    Last Post: 2006-07-30, 01:34 AM
  3. Subpanel field layout
    By skovron in forum Help
    Replies: 1
    Last Post: 2006-02-10, 01:37 AM
  4. adding related field on subpanel
    By y2chuck in forum Developer Help
    Replies: 0
    Last Post: 2005-11-14, 07:22 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
  •