Results 1 to 5 of 5

Thread: Error with default Language

  1. #1
    jeg1972 is offline Sugar Community Member
    Join Date
    Apr 2006
    Posts
    33

    Default Error with default Language

    I've just been investigating a problem with sending and receiving mail in Sugar (OS 4.2.0d) and I turned on debugging to check things out, it was then that I noticed that many errors and warnings appear complaining about the laguage file en_us.lang.php not being available, one such message is here:

    Fatal error: return_module_language(): Failed opening required 'modules//language/en_us.lang.php' (include_path='.:/usr/local/lib/php') in /usr/local/apache2/htdocs/crm/include/utils.php on line 694

    Now, modules//language/en_us.lang.php does not exist, the language directory doesn't exist at all and I'd like to solve the problem. Has anyone come across this and can give me a pointer to its resolution?

    Thanks in advance

    Regards

    John

  2. #2
    julian's Avatar
    julian is offline Sugar Team Member
    Join Date
    Sep 2004
    Posts
    1,639

    Default Re: Error with default Language

    Hello John,

    From the look of it, the $module variable was empty. Usually it would be inserted as part of that path, i.e. ./modules/$MODULE/language/en_us.lang.php.

    In order to diagnose where this is coming from, try inserting the following code into ./include/utils.php:

    PHP Code:
    if ($module == "") {
         echo 
    "<pre>"print_r(debug_backtrace()); echo "</pre>";
    }

    require(
    "modules/$module/language/$default_language.lang.php"); //line 694 
    This belongs directly above line 694.

    Revisit the page which generates the error and you should see some debug output on the screen. If you can, copy/paste that debug output here.
    Last edited by julian; 2006-05-31 at 05:22 PM.
    Julian Ostrow
    Systems and Applications Engineer
    SugarCRM Inc.

  3. #3
    jeg1972 is offline Sugar Community Member
    Join Date
    Apr 2006
    Posts
    33

    Default Re: Error with default Language

    Quote Originally Posted by julian
    Hello John,

    From the look of it, the $module variable was empty. Usually it would be inserted as part of that path, i.e. ./modules/$MODULE/language/en_us.lang.php.

    In order to diagnose where this is coming from, try inserting the following code into ./include/utils.php:

    PHP Code:
    if ($module == "") {
         echo 
    "<pre>"print_r(debug_backtrace()); echo "</pre>";
    }

    require(
    "modules/$module/language/$default_language.lang.php"); //line 694 
    This belongs directly above line 694.

    Revisit the page which generates the error and you should see some debug output on the screen. If you can, copy/paste that debug output here.
    Julian

    I added the code, refreshed the page and voila! The language pack error message disappears... I still have other warnings not relating to the language pack, but that code seems to have completely supressed the language pack Error that was being displayed... very strange.

    John

  4. #4
    jeg1972 is offline Sugar Community Member
    Join Date
    Apr 2006
    Posts
    33

    Default Re: Error with default Language

    OK Julian

    I went to another part of the system that was throwing up the same error and I get this:

    Warning: return_module_language(modules/Simple/language/en_us.lang.php): failed to open stream: No such file or directory in /usr/local/apache2/htdocs/crm/include/utils.php on line 661

    Warning: return_module_language(): Failed opening 'modules/Simple/language/en_us.lang.php' for inclusion (include_path='.:/usr/local/lib/php') in /usr/local/apache2/htdocs/crm/include/utils.php on line 661

    Warning: return_module_language(modules/Simple/language/en_us.lang.php): failed to open stream: No such file or directory in /usr/local/apache2/htdocs/crm/include/utils.php on line 699

    Fatal error: return_module_language(): Failed opening required 'modules/Simple/language/en_us.lang.php' (include_path='.:/usr/local/lib/php') in /usr/local/apache2/htdocs/crm/include/utils.php on line 699

    Do you want me to paste the code above line 661 and 699 as well?

    John

  5. #5
    julian's Avatar
    julian is offline Sugar Team Member
    Join Date
    Sep 2004
    Posts
    1,639

    Default Re: Error with default Language

    Hello John,

    Are you using any custom modules (or extensions from SugarForge)? The "Simple" module isn't part of the stock Sugar installation, and may be causing these errors.
    Julian Ostrow
    Systems and Applications Engineer
    SugarCRM Inc.

Thread Information

Users Browsing this Thread

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

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
  •