Popup and some errors with "undefined" text

Hi, I have a project installed with the following features:

CRM Suite version 7.2.1
Sugar CRM version 6.5.20

In the popups and some error messages I get as “undefined”, instead of the corresponding text. I have reviewed the issue of permissions to the adviser as well as made a quick repair of the project from Admin, but those messages keep coming out. What I can do?.

Thanks in advance and greetings

Maybe you didn’t get your permissions right. Sometimes it’s complicated.

Is this a new installation? Or have you been working with these “undefineds” for years?

It is the migration to other servers. Those messages did not come out on the original server.

In one on which I have more control …, I have the permissions that I specify then I delete the cache and do a quick repair, but the messages “undefined” continue to come out :frowning:

#! / bin / bash

APACHEUSER = 'www-data: www-data'
SUGARPATH = '/ var / www / <project>'

find -P $ SUGARPATH / -type d -exec chmod 755 {} \;
find -P $ SUGARPATH / -type f -exec chmod 644 {} \;
find -P $ SUGARPATH / -name * .js -exec chmod 755 {} \;

chmod 664 $ SUGARPATH / config.php
chmod 664 $ SUGARPATH / config_override.php
chmod 664 $ SUGARPATH / sugarcrm.log

find -P $ SUGARPATH / cache -type d -exec chmod 775 {} \;
find -P $ SUGARPATH / custom -type d -exec chmod 775 {} \;
find -P $ SUGARPATH / data -type d -exec chmod 775 {} \;
find -P $ SUGARPATH / examples -type d -exec chmod 775 {} \;
find -P $ SUGARPATH / include -type d -exec chmod 775 {} \;
find -P $ SUGARPATH / install -type d -exec chmod 775 {} \;
find -P $ SUGARPATH / jssource -type d -exec chmod 775 {} \;
find -P $ SUGARPATH / log4php -type d -exec chmod 775 {} \;
find -P $ SUGARPATH / metadata -type d -exec chmod 775 {} \;
find -P $ SUGARPATH / mobile -type d -exec chmod 775 {} \;
find -P $ SUGARPATH / ModuleInstall -type d -exec chmod 775 {} \;
find -P $ SUGARPATH / modules -type d -exec chmod 775 {} \;
find -P $ SUGARPATH / service -type d -exec chmod 775 {} \;
find -P $ SUGARPATH / soap -type d -exec chmod 775 {} \;
find -P $ SUGARPATH / themes -type d -exec chmod 775 {} \;
find -P $ SUGARPATH / upload -type d -exec chmod 775 {} \;
find -P $ SUGARPATH / XTemplate -type d -exec chmod 775 {} \;
find -P $ SUGARPATH / Zend -type d -exec chmod 775 {} \;

find -P $ SUGARPATH / cache -type f -exec chmod 664 {} \;
find -P $ SUGARPATH / custom -type f -exec chmod 664 {} \;
find -P $ SUGARPATH / data -type f -exec chmod 664 {} \;
find -P $ SUGARPATH / examples -type f -exec chmod 664 {} \;
find -P $ SUGARPATH / include -type f -exec chmod 664 {} \;
find -P $ SUGARPATH / install -type f -exec chmod 664 {} \;
find -P $ SUGARPATH / jssource -type f -exec chmod 664 {} \;
find -P $ SUGARPATH / log4php -type f -exec chmod 664 {} \;
find -P $ SUGARPATH / metadata -type f -exec chmod 664 {} \;
find -P $ SUGARPATH / mobile -type f -exec chmod 664 {} \;
find -P $ SUGARPATH / ModuleInstall -type f -exec chmod 664 {} \;
find -P $ SUGARPATH / modules -type f -exec chmod 664 {} \;
find -P $ SUGARPATH / service -type f -exec chmod 664 {} \;
find -P $ SUGARPATH / soap -type f -exec chmod 664 {} \;
find -P $ SUGARPATH / themes -type f -exec chmod 664 {} \;
find -P $ SUGARPATH / upload -type f -exec chmod 664 {} \;
find -P $ SUGARPATH / XTemplate -type f -exec chmod 664 {} \;
find -P $ SUGARPATH / Zend -type f -exec chmod 664 {} \;

chown -R $ APACHEUSER $ SUGARPATH

I don’t think that script will work, there are too many added spaces in there (between the “$” and the variable names, and after the “:” in www-data:www-data).

You can do this command on the root of your SuiteCRM install

ls -al

and post the results here so we can check if the effective permissions are well applied.

By the way, the recommended commands to set permissions are much simpler than that:

First “cd” into the directory where you have SuiteCRM and then


sudo chown -R www-data:www-data .
sudo chmod -R 755 .
sudo chmod -R 775 cache custom modules themes data upload config_override.php

No, the whites have been put by the “Google Translator”. With ls -al out this:

total 1444
drwxr-sr-x 26 www-data www-data 4096 abr 2 14:20 .
drwxrwsr-x 14 root www-data 4096 abr 2 12:36 …
-rw-r–r-- 1 www-data www-data 2743 oct 18 19:03 acceptDecline.php
drwxrwsr-x 10 www-data www-data 4096 abr 2 13:13 cache
-rw-r–r-- 1 www-data www-data 3590 oct 18 19:03 campaign_tracker.php
-rw-r–r-- 1 www-data www-data 2748 oct 18 19:03 campaign_trackerv2.php
drwxr-sr-x 2 www-data www-data 4096 oct 18 19:09 cgi-bin
-rw-r–r-- 1 www-data www-data 12270 nov 27 15:40 config - copia.php
-rw-rw-r-- 1 www-data www-data 4317 abr 2 11:55 config_override.php
-rw-rw-r-- 1 www-data www-data 12862 mar 2 11:48 config.php
-rw-r–r-- 1 www-data www-data 11273 oct 18 19:03 config.php.org
-rw-r–r-- 1 www-data www-data 3922 oct 18 19:03 cron.php
-rw-r–r-- 1 www-data www-data 2446 oct 18 19:03 crossdomain.xml
drwxrwsr-x 15 www-data www-data 4096 mar 27 13:34 custom
drwxrwsr-x 3 www-data www-data 4096 nov 30 23:25 data
drwxr-sr-x 2 www-data www-data 4096 mar 28 13:48 database
-rw-r–r-- 1 www-data www-data 2388 oct 18 19:03 dictionary.php
-rw-r–r-- 1 www-data www-data 11578 oct 18 19:03 download.php
-rw-r–r-- 1 www-data www-data 2392 oct 18 19:03 emailmandelivery.php
drwxrwsr-x 2 www-data www-data 4096 nov 30 23:25 examples
-rw-r–r-- 1 www-data www-data 4912 oct 18 19:03 export.php
-rw-r–r-- 1 www-data www-data 718163 oct 18 19:03 files.md5
-rw-r–r-- 1 www-data www-data 2903 oct 18 19:03 get_url.php
drwxr-sr-x 8 www-data www-data 4096 abr 2 11:47 .git
-rw-r–r-- 1 www-data www-data 214 mar 28 13:36 .gitignore
-rw-r–r-- 1 www-data www-data 2811 oct 18 19:03 HandleAjaxCall.php
-rw-r–r-- 1 www-data www-data 721 mar 28 10:35 .htaccess
-rw-r–r-- 1 www-data www-data 2371 oct 18 19:03 ical_server.php
-rw-r–r-- 1 www-data www-data 2735 oct 18 19:03 image.php
drwxrwsr-x 53 www-data www-data 4096 mar 27 06:57 include
-rw-r–r-- 1 www-data www-data 2525 oct 18 19:03 index.php
drwxrwsr-x 6 www-data www-data 4096 dic 18 14:08 install
-rw-r–r-- 1 www-data www-data 24752 oct 18 19:03 install.log
-rw-r–r-- 1 www-data www-data 24507 oct 18 19:03 install.php
-rw-r–r-- 1 www-data www-data 13373 oct 18 19:03 json_server.php
drwxrwsr-x 3 www-data www-data 4096 mar 1 15:41 jssource
-rw-r–r-- 1 www-data www-data 2737 oct 18 19:03 leadCapture.php
-rw-r–r-- 1 www-data www-data 34539 oct 18 19:03 LICENSE.txt
drwxrwsr-x 2 www-data www-data 4096 nov 30 23:29 log4php
-rw-r–r-- 1 www-data www-data 2313 oct 18 19:03 log_file_restricted.html
-rw-r–r-- 1 www-data www-data 86788 oct 18 19:03 log.log
-rw-r–r-- 1 www-data www-data 2376 oct 18 19:03 maintenance.php
-rw-r–r-- 1 www-data www-data 696 oct 18 19:03 manifest.php
drwxrwsr-x 2 www-data www-data 4096 nov 30 23:29 metadata
-rw-r–r-- 1 www-data www-data 2298 oct 18 19:03 metagen.php
drwxrwsr-x 8 www-data www-data 4096 nov 30 23:29 mobile
drwxrwsr-x 3 www-data www-data 4096 nov 30 23:29 ModuleInstall
drwxrwsr-x 145 www-data www-data 4096 abr 2 15:11 modules
drwxr-sr-x 3 www-data www-data 4096 mar 3 09:26 nbproject
-rw-r–r-- 1 www-data www-data 2890 oct 18 19:03 pdf.php
-rw-r–r-- 1 www-data www-data 42949 oct 18 19:04 qi5.svg
-rw-r–r-- 1 www-data www-data 565 mar 1 16:45 README.md
-rw-r–r-- 1 www-data www-data 226 oct 18 19:03 readme.txt
-rw-r–r-- 1 www-data www-data 2737 oct 18 19:03 removeme.php
-rw-r–r-- 1 www-data www-data 73 oct 18 19:03 robots.txt
-rw-r–r-- 1 www-data www-data 3588 oct 18 19:04 run_job.php
drwxr-sr-x 2 www-data www-data 4096 nov 29 14:16 SAT_backup
drwxrwsr-x 11 www-data www-data 4096 nov 30 23:34 service
drwxrwsr-x 2 www-data www-data 4096 nov 30 23:34 soap
-rw-r–r-- 1 www-data www-data 4091 oct 18 19:04 soap.php
-rw-r–r-- 1 www-data www-data 3481 abr 2 14:37 sugarcrm.log
-rw-r–r-- 1 www-data www-data 5327 oct 18 19:04 SugarSecurity.php
-rw-r–r-- 1 www-data www-data 150 oct 18 19:04 sugar_version.json
-rw-r–r-- 1 www-data www-data 2264 oct 18 19:04 sugar_version.php
-rw-r–r-- 1 www-data www-data 162 oct 18 19:04 suitecrm_version.php
-rw-r–r-- 1 www-data www-data 25 oct 18 19:04 test.php
drwxrwsr-x 7 www-data www-data 4096 mar 1 15:41 themes
-rw-r–r-- 1 www-data www-data 5843 oct 18 19:04 TreeData.php
-rw-r–r-- 1 www-data www-data 123781 mar 3 01:24 upgradeWizard.log
drwxrwsr-x 3 www-data www-data 4096 abr 2 12:43 upload
-rw-r–r-- 1 www-data www-data 2707 oct 18 19:04 vcal_server.php
-rw-r–r-- 1 www-data www-data 2980 oct 18 19:04 vCard.php
drwxr-sr-x 2 www-data www-data 61440 nov 30 23:40 webstat
-rw-r–r-- 1 www-data www-data 2743 oct 18 19:04 WebToLeadCapture.php
drwxrwsr-x 2 www-data www-data 4096 nov 30 23:40 XTemplate
drwxrwsr-x 8 www-data www-data 4096 nov 30 23:41 Zend

With these instructions only, the messages “undefined” continue to appear.

Try a Quick Repair and Rebuild.

Also, check your logs:

  • suitecrm.log
  • php_errors.log
  • browser developer console

After “Quick Repair and Rebuild”

In error.log:

[Wed Apr 04 13:36:40.773965 2018] [:error] [pid 4086] [client ::1:46078] PHP Notice: Undefined index: LNK_REPORT_ONDEMAND in /var/www/sfcc/modules/zr2_Report/Menu.php on line 8, referer: http://localhost/sfcc/index.php?module=Administration&action=repair
[Wed Apr 04 13:36:40.774059 2018] [:error] [pid 4086] [client ::1:46078] PHP Notice: Undefined index: LNK_ARCHIVE_LIST in /var/www/sfcc/modules/zr2_Report/Menu.php on line 9, referer: http://localhost/sfcc/index.php?module=Administration&action=repair
[Wed Apr 04 13:36:40.774094 2018] [:error] [pid 4086] [client ::1:46078] PHP Notice: Undefined index: LNK_JASPERREPORTS_LIST in /var/www/sfcc/modules/zr2_Report/Menu.php on line 10, referer: http://localhost/sfcc/index.php?module=Administration&action=repair
[Wed Apr 04 13:36:40.774124 2018] [:error] [pid 4086] [client ::1:46078] PHP Notice: Undefined index: LNK_JASPERREPORTS_NEW in /var/www/sfcc/modules/zr2_Report/Menu.php on line 11, referer: http://localhost/sfcc/index.php?module=Administration&action=repair
[Wed Apr 04 13:36:40.774151 2018] [:error] [pid 4086] [client ::1:46078] PHP Notice: Undefined index: LNK_QUERYTEMPLATE_LIST in /var/www/sfcc/modules/zr2_Report/Menu.php on line 12, referer: http://localhost/sfcc/index.php?module=Administration&action=repair
[Wed Apr 04 13:36:40.774179 2018] [:error] [pid 4086] [client ::1:46078] PHP Notice: Undefined index: LNK_QUERYTEMPLATE_NEW in /var/www/sfcc/modules/zr2_Report/Menu.php on line 13, referer: http://localhost/sfcc/index.php?module=Administration&action=repair
[Wed Apr 04 13:36:40.774204 2018] [:error] [pid 4086] [client ::1:46078] PHP Notice: Undefined index: LNK_PARAMETER_LIST in /var/www/sfcc/modules/zr2_Report/Menu.php on line 14, referer: http://localhost/sfcc/index.php?module=Administration&action=repair
[Wed Apr 04 13:36:40.774231 2018] [:error] [pid 4086] [client ::1:46078] PHP Notice: Undefined index: LNK_PARAMETER_NEW in /var/www/sfcc/modules/zr2_Report/Menu.php on line 15, referer: http://localhost/sfcc/index.php?module=Administration&action=repair

In suitecrm.log there is nothing and attached screen of the console.

Those errors don’t look relevant to me. PHP notices usually aren’t important, and that browser error, everyone gets it.

I don’t know what else to suggest… sometimes a PHP upgrade fixes weird behaviours.

Ok. Anyway thank you very much.

Hello, I have seen that in the cache folder of my project, the “themes” folder is generated with other permissions … (I do not know what is due …). Attach screen. Could this have to do with the “undefined” messages ?:

total 28
drwxrws— 2 www-data www-data 4096 abr 6 13:12 dashlets
drwxrws— 3 www-data www-data 4096 abr 6 13:12 include
drwxrws— 11 www-data www-data 4096 abr 6 13:19 jsLanguage
drwxrws— 132 www-data www-data 4096 abr 6 13:07 modules
drwxrws— 2 www-data www-data 4096 abr 6 13:12 Relationships
drwxrws— 5 www-data www-data 4096 abr 6 13:06 smarty
drwxr-s— 5 www-data www-data 4096 abr 6 13:06 themes

Thanks and best regards,

Gema

You can try setting the default_permissions array in your config.php, that might help.

Other than that, permissions on newly created directories and files also depend on some settings in the parent folder (the setUID and setGID bits) so there might be something peculiar in your installation, messing things up.

The current project does not depend on me permissions, in Windows environment.

But for your information in other environments, Linux, I have managed through updates to more recent versions to resolve this error :).

Thanks for the support and a greeting.