Results 1 to 5 of 5

Thread: Labels not working for custom sub-panels

  1. #1
    anisbet1 is offline Member
    Join Date
    Apr 2010
    Posts
    8

    Default Labels not working for custom sub-panels

    Good afternoon,

    We have recently run into a very odd problem, and I am hoping the community can give me some ideas on how I can resolve it. We have added some custom modules to our system(created via the module build, and loaded via the module loader) and the build some relationships between some core modules and these new custom built ones(using studio) Functionally everything seems to work properly but the sub panel labels are showing up in the detail views as the internal default label value.

    Example

    A one -to many relations has been set-up between Head-ends and Accounts. The sub-panel label in the accounts detail view should be Head-Ends. instead we are seeing LBL_ACCOUNTS_HE_HEAD_ENDS_FROM_HE_HEAD_ENDS_TITLE. If I go into studio and open up the subpanel(which is also named this) the sub-panel title is listed as Head-Ends, but that never appears in the Account's default view. Oddly enough if I create a relationship between the two the labels show up correctly. Its just the case of a one-to-many relationship between a core module(one) and a custom module(many) where we are seeing this. We have run every repair available, and uninstalled and resinstalled the module several times with no luck. I can in and manually edit the vardefs file to make it work, but obviously this is not upgrade safe. Anyone have any ideas on what is broken here?


    Environment

    Gentoo Linux
    Apache 2.2.3
    PHP 5
    Mysql 5
    Sugar 5.5.1 CE

    Thanks

  2. #2
    andopes's Avatar
    andopes is offline A Sugar Hero | Help Forum Moderator
    Join Date
    Jul 2006
    Location
    São Paulo - Brazil
    Posts
    8,335

    Default Re: Labels not working for custom sub-panels

    Generally it happens because some language file are overridden the $mod_strings instead of just updating it.
    For example:

    PHP Code:
    $mod_strings = array(
      
    'LBL_FOO' => 'Foo',
    ); 
    Instead of:

    PHP Code:
    $mod_strings['LBL_FOO'] = 'Foo'
    Look for all files inside custom/Extension/modules/Accounts/Ext/Language and all files into custom/modules/Accounts/language/ and check if some ones are overridden the $mod_strings instead of updating it.
    Fix the files as my examples.

    Go to Admin -> Repair -> Rebuild Extensions;
    Delete the files inside cache/modules/Accounts/language/ and try again;

    Cheers
    André Lopes
    DevToolKit / Project of the Month - June 2009
    Lampada Global Services- Open Source Solutions
    Avenida Ipiranga, 318
    Bloco B - CJ 1602
    São Paulo, SP 01046-010
    Brazil
    Office: +55 11 3237-3110
    Mobile: +55 11 7636-5859
    e-mail: andre@lampadaglobal.com

    Lampada Global delivers offshore software development and support services to customers around the world.
    Lampada is proud to be a SugarCRM Gold Partner, revolutionizing Customer Relationship Management.

    I DO NOT answer questions through PM and Email. If you need some help post your question into SugarForum.

  3. #3
    anisbet1 is offline Member
    Join Date
    Apr 2010
    Posts
    8

    Default Re: Labels not working for custom sub-panels

    I did as you suggested, but the problem is still present. I took a look at the regenerated file in /cache/modules/Accounts/language (en_us.lang.php) and the labels are correct here. Anything else you can think of, that I can try?

    Thank you very much for your assistance.

  4. #4
    Aisha16 is offline Sugar Community Member
    Join Date
    May 2008
    Posts
    35

    Default Re: Labels not working for custom sub-panels

    hi,

    we are having the same issue. did you find a solution ?

  5. #5
    smac is offline Member
    Join Date
    Jun 2010
    Posts
    17

    Default Re: Labels not working for custom sub-panels

    Hi There,

    We have a similar problem. However the problem was not with the language files but with the Layoutdefs files.

    For example we had a relationship between calls and opportunities.
    There was a file in custom/Extension/modules/Calls/Ext/Layoutdefs/customcalls_opportunities.php

    Within this file was
    $layout_defs["Calls"]["subpanel_setup"]["calls_opportunities"] = array (
    'order' => 100,
    'module' => 'Opportunities',
    'subpanel_name' => 'default',
    'sort_order' => 'asc',
    'sort_by' => 'id',
    'title_key' => 'LBL_CALLS_OPPORTUNITIES_FROM_OPPORTUNITIES_TITLE' ,
    'get_subpanel_data' => 'calls_opportunities',
    );

    We noticed that when we change the subpanel title in Studio it actually changed a field called LBL_CALLS_OPPORTUNITIES_SUBPANEL_TITLE in the language file
    so we changed:
    'title_key' => 'LBL_CALLS_OPPORTUNITIES_FROM_OPPORTUNITIES_TITLE' ,
    to
    'title_key' => LBL_CALLS_OPPORTUNITIES_SUBPANEL_TITLE
    This fixed our problem!

    Note: the changes to this file were propogated through to custom/modules/Calls/Layoutdefs/layoutdefs.ext.php automatically.

    Hope that helps!

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Changing labels of panels bug??
    By zonez in forum Help
    Replies: 6
    Last Post: 2009-11-30, 07:29 AM
  2. Export custom panels,dropdowns,fields
    By ishaan in forum Developer Help
    Replies: 1
    Last Post: 2009-05-15, 02:20 PM
  3. Multiple Custom Sub Panels on Custom Module
    By harpic in forum Developer Help
    Replies: 0
    Last Post: 2008-06-30, 10:46 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
  •