CRM Open Source Business & Social CRM Software

Results 1 to 3 of 3

Thread: Issue with language cache logic with 5.0 & 5.1

  1. #1
    Vince is offline Sugar Community Member
    Join Date
    Jul 2004
    Posts
    92

    Smile Issue with language cache logic with 5.0 & 5.1

    I think there is something wrong with the clean of language cache file, because the function only delete the default language cache files and not all languages files when a user click on repair.

    In order to correct this I think you should modify the following file : \include\SugarObjects\LanguageManager.php

    Go to function clearLanguageCache() and modify it as follow (if you suppress code between BOF SYNOLIA / EOF SYNOLIA you get the original code) :
    PHP Code:
        /**
         * clear out the language cache.
         * @param string module_dir the module_dir to clear, if not specified then clear
         *                      clear vardef cache for all modules.
         * @param string lang the name of the object we are clearing this is for sugar_cache
         */
        
    function clearLanguageCache($module_dir ''$lang ''){
            
    //BOF SYNOLIA
            /* Previous code clean only default language
            //EOF SYNOLIA
            if(empty($lang))
                $lang = $GLOBALS['sugar_config']['default_language'];
            //BOF SYNOLIA
            */
            //EOF SYNOLIA

            //BOF SYNOLIA
            // If no lang is provided then clean up all languages instead of only the default language
            
    global $sugar_config;
            if(empty(
    $lang)) {
                foreach(
    $sugar_config['languages'] as $lang=>$value){
                    
    //if we have a module name specified then just remove that vardef file
                    //otherwise go through each module and remove the vardefs.php
                    
    if(!empty($module_dir)){
                        
    LanguageManager::_clearCache($module_dir$lang);
                    }else{
                        global 
    $beanList;
                        foreach(
    $beanList as $module_dir => $object_name){
                            
    LanguageManager::_clearCache($module_dir$lang);
                        }
                    }
                }
            } else {
            
    //EOF SYNOLIA

                //if we have a module name specified then just remove that vardef file
                //otherwise go through each module and remove the vardefs.php
                
    if(!empty($module_dir)){
                    
    LanguageManager::_clearCache($module_dir$lang);
                }else{
                    global 
    $beanList;
                    foreach(
    $beanList as $module_dir => $object_name){
                        
    LanguageManager::_clearCache($module_dir$lang);
                    }
                }
            
    //BOF SYNOLIA
            
    }
            
    //EOF SYNOLIA
        

    HTH
    SYNOLIA
    Oldest SugarCRM partner in the world and Gold Partner / Partenaire GOLD SugarCRM
    Official French Translator / Responsable de la traduction Française

    51 Avenue Jean Jaurès - 69007 LYON - FRANCE - Tel : +33 4 27 70 53 70
    www.synolia.com | @synolia sur Twitter
    www.crm-france.com | Forum CRM-France

  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,261

    Default Re: Issue with language cache logic with 5.0 & 5.1

    Hi Vince

    You can file a bug into bugs.sugarcrm.com reporting this issue.

    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
    Vince is offline Sugar Community Member
    Join Date
    Jul 2004
    Posts
    92

    Thumbs up Re: Issue with language cache logic with 5.0 & 5.1

    Yep I went through the support for this and usually they file a bug and give me the number.
    I posted it here in order to help other multilingual users.

    edit : Here it is : 25316 (thank you Breno, this guy is very efficient)

    Vince
    Last edited by Vince; 2008-10-03 at 06:27 PM.
    SYNOLIA
    Oldest SugarCRM partner in the world and Gold Partner / Partenaire GOLD SugarCRM
    Official French Translator / Responsable de la traduction Française

    51 Avenue Jean Jaurès - 69007 LYON - FRANCE - Tel : +33 4 27 70 53 70
    www.synolia.com | @synolia sur Twitter
    www.crm-france.com | Forum CRM-France

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Query Failed: AND users.id = '1'::MySQL error 1064:
    By artco001 in forum Installation and Upgrade Help
    Replies: 63
    Last Post: 2009-05-07, 06:56 AM
  2. 5.0 > 5.1 upgrade - issue with custom module
    By stevenjohn in forum Installation and Upgrade Help
    Replies: 0
    Last Post: 2008-09-24, 12:13 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
  •