Undefined when executing

Hi there.
I have running 2 instances in production and averything seems tu run ok.
But when using the crm and every time i click on accounts or whatever funciĆ³n i see the spinner running and it says undefined.

Is tthis a normal behaviour? :ohmy:

The servers are:

  • Apache 2.4.25
  • Ubuntu 16.04
  • php 7.0.20
  • Plesk 17

Please advise.
Regards,
Paco

You forgot to say your SuiteCRM version. If itā€™s 7.9 then please upgrade to 7.9.1.

Also, are you using a Language Pack? Did you update it to match your SuiteCRM version, following every step of these instructions?:
https://sites.google.com/site/translatingsuitecrm/faq/updatelanguage

Then try a Quick Repair and Rebuild.

Then if the problem persists, you need to check / reset your permissions.

Dear Pgr.

Thank you very much for your reply.
Yes you are right, Forgot to mention. the version is already upgraded to 7.9.1 (both instances)

Tried Quick Repair and Rebuild. But didnĀ“t help :frowning:

How would be the best way to check/reset permisions?
Hoping to hear from you again.
Regards,
Paco

And yes. I DO have the spanish language pack installed and executed Quick Repair and Rebuild. And everything when fine.
But as expected. the behaviour didnĀ“t change. Still get the same message.
How would be the best way to check/reset permisions?
Hoping to hear from you again.
Regards,
Paco

To check permissions, go in to Admin/Schedulers and tell me the text at the bottom specifying how to configure the cron jobs. That will tell me what user your web-server is running under.

Than post here the full outputs of this command (run it from the SuiteCRM root folder):

ls -al

This way I can get a quick glimpse of your permissions scheme and then hopefully suggest commands to fix it, if necessary.

Hi Pgr.

This is a Plesk with Ubuntu 16ā€¦0.4
Please note:
Admin /schedulers
In order to run SuiteCRM Schedulers, edit your web server userā€™s crontab file with this command:
sudo crontab -e -u computer-es
ā€¦ and add the following line to the crontab file:

          • cd /var/www/vhosts/computerinterpro.es/crm.computerinterpro.es; php -f cron.php > /dev/null 2>&1 
            

Please note, I have not setup the cronjob yet. Will do this once this is clarified and solved.

Please see also attached image
Please advise.
Regards,
Paco

Make sure you have a proper complete backup before following my instructions!

Ok, so your web-server user seems to be ā€œcomputer-esā€.

Please confirm if he is part of the ā€œpsaclnā€ group with this command:

groups computer-es

Then your commands to reset permissions would be these, given from the SuiteCRM root directory:


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

Thatā€™s a space followed be a dot (" .") at the end of some of those commands.

You can also go into config.php and change the default_permissions array in this way:


'default_permissions' =>
     array (
           'dir_mode' => 1517,
           'file_mode' => 420,
           'user' => 'computer-es',
           'group' => 'psacln',
     ), 

When you set up your cron jobs, make sure you do it in the ā€œcomputer-esā€ userā€™s crontab, otherwise you will mess up permissions again.

Tell me if this solves your problem.

1 Like

Dear Pgr.

I did this:
sudo chmod -R 755 .
sudo chmod -R 775 cache custom modules themes data upload config_override.php
This worked.

You can also go into config.php and change the default_permissions array in this way:

ā€˜default_permissionsā€™ =>
array (
ā€˜dir_modeā€™ => 1517,
ā€˜file_modeā€™ => 420,
ā€˜userā€™ => ā€˜computer-esā€™,
ā€˜groupā€™ => ā€˜psaclnā€™,
),

My dir_mode and File_mode is a bit different than yours:
ā€˜default_permissionsā€™ =>
array (
ā€˜dir_modeā€™ => 1528,
ā€˜file_modeā€™ => 493,
ā€˜userā€™ => ā€˜computer-esā€™,
ā€˜groupā€™ => ā€˜psaclnā€™,
),
Is this ok, like I have it or would it be ā€œbetterā€ to place your values in the config.php file?

But now it seems to work. Now it says: ā€œLoading page, please waitā€
And already commented i have 2 languages, English and Spanish. The message above is also stated when I am in Spanish language enviroment.
Is this normal behaviour?

So except for this language behaviour you solution works.
So for this I want to thank you.
Many thanks , than,
Paco

Well, those are decimal versions of the numbers in octal that you are familiar with in Linux permissions.

So your 1528 is a 2770 in octal, and your 493 is a 755 in octal.

I think thatā€™s ok, you donā€™t need to change it, unless that 0 brings you problems one day (if you have a user that does not own the file, and does not belong to the psacln group, but that you still want to be able to access it. That is unlikely).

My suggested permissions were actually less permissive than yours in some scenarios, now I realize. I just copied them from ā€œrecommended settingsā€ found elsewhere in this forum.

About the label, this is how it looks in my system with a Portuguese language pack:


/var/www/html/language/en_us.lang.php:2167:    'LBL_LOADING_PAGE' => 'Loading page, please wait...',

/var/www/html/include/language/en_us.lang.php:2157:    'LBL_LOADING_PAGE' => 'Loading page, please wait...',

/var/www/html/include/language/pt_PT.lang.php:2150:    'LBL_LOADING_PAGE' => 'A carregar pƔgina, por favor aguarde...',

Maybe you can check if that label is there in the Spanish language pack?

Or maybe all you need is a Quick Repair and Rebuild, now that your permissions are fixed, so SuiteCRM can get all the labels from the files.

Hello
I would suggest check your .htaccess on the route of your SuiteCRM installation.
Do you have correct path for the variable RewriteBase?

Hello Urdhvatech.
I forgot all about this.

Please see attachment.
Can you finde that could strike you as odd?

Thank you in advance for your tine.
Regards,
Paco

Hi Pgr.
The values you mention are all there in spanish.
/var/www/html/language/en_us.lang.php:2167: ā€˜LBL_LOADING_PAGEā€™ => ā€˜Loading page, please waitā€¦ā€™,

/var/www/html/include/language/en_us.lang.php:2157: ā€˜LBL_LOADING_PAGEā€™ => ā€˜Loading page, please waitā€¦ā€™,

/var/www/html/include/language/pt_PT.lang.php:2150: ā€˜LBL_LOADING_PAGEā€™ => ā€˜A carregar pĆ”gina, por favor aguardeā€¦ā€™,
And Quick Repair and Rebuild didnĀ“t help much

But it still keeps coming up in english :frowning:
Going to portugal next week, (to my home) maybe you can give me a course :wink:
Regards,
Paco

You can see here the .htaccess that the installer writes by default:

https://github.com/salesagility/SuiteCRM/blob/673712cc1faf269d470767430bf734e09f126b6a/install/install_utils.php#L925

Yours looks pretty normal to meā€¦ though I canā€™t say I checked every little detail.