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.