Matt Connolly
Matt Connolly

Reputation: 9857

SugarCRM undefined index 'LNK_IMPORT_ACCOUNTS'

I've cloned a SugarCRM installation to do some development work on. The main installation is working fine. The clone, however, shows this error message on most pages:

Undefined index: LNK_IMPORT_ACCOUNTS in E:\sugarcrm\modules\Project\Menu.php on line 51

Stack trace:

#   Time    Memory  Function    Location
1   0.0002  369896  {main}( )   ..\index.php:0
2   0.1949  10955048    SugarApplication->execute( )    ..\index.php:44
3   0.2216  11487864    SugarController->execute( ) ..\SugarApplication.php:85
4   0.2221  11488048    SugarController->processView( ) ..\SugarController.php:274
5   0.2363  13555528    SugarView->process( )   ..\SugarController.php:293
6   0.2394  13577848    SugarView->displayHeader( ) ..\SugarView.php:119
7   0.3088  16498752    SugarView->getMenu( string(7) ) ..\SugarView.php:559
8   0.3091  16511816    require( 'E:\sugarcrm\modules\Project\Menu.php' )   ..\SugarView.php:981

I'm not very familiar with how SugarCRM populates its global $mod_strings array which is expecting to have this index in it. As far as I can see the method LanguageManager::loadModuleLanguage() will load the strings from a cache file. I've verified that the cache file exists and contains this key, as well as deleted everything from the cache directory, and I still get the above error message.

Any ideas?

Upvotes: 0

Views: 1383

Answers (1)

erop
erop

Reputation: 1590

Please have a look SugarCRM Developer Guide section related to customizing language strings, vardefs and so on using 'custom/Extension' directory. "Languages" paragraph gives complete information on adding and modifying custom language strings.

In your situation I think you should update/create file 'custom/Extension/modules/Project/Ext/Language/en_us.custom.lang.php' and add

$mod_strings['LNK_IMPORT_ACCOUNTS'] = 'Import Accounts';

to the end of the file.

Upvotes: 1

Related Questions