Undefined labels in Studio Layout Editor - The Old Permissions Problem?

In the Studio Layout Editor, on top of the field are usually an element labeled ‘new row’ and ‘filler’. However, it’s labeling though items as ‘undefined’. I know this is using a permissions problem having to do with the language files I think. But I’ve tried everything to remedy and still no fix. This is what I’ve done:

chown -R :
(Replacing and with user and group name for that particular website)

chmod -R 755
(note that a previous post suggested using 775 for this - this will cause 500 error with apache error that the PHP file is group writable - guess this is default security of Cpanel?)

chmod -R 775 cache custom modules themes data upload config_override.php
(executed from within of course)

rm -fr cache/*
(clear out all cache files)

Edit default permissions in config.php to this:

‘default_permissions’ => array (
‘dir_mode’ => 02775,
‘file_mode’ => 0775,
‘user’ => ‘’,
‘group’ => ‘’,
),

Run Quick Repair.

After all that - no change.

Even I have the same issue. When I checked the browser console I found that language files are not loaded.

mysite.com/cache/jsLanguage/en_us.js?v=UdRFWZFf2o9goZrGoZr3og Failed to load resource: the server responded with a status of 404 (OK)
mysite.com/cache/jsLanguage/Administrati...RFWZFf2o9goZrGoZr3og Failed to load resource: the server responded with a status of 404 (OK)

Not sure why these files are not loaded.

I checked the JS console and saw the same thing as above so I made sure the cache directory permissions was 775 and cleared the cache and did a quick repair. I then wasn’t seeing 404 errors for these files in the JS console. However I tried to just load the JS URL in another window.

If you try to go to these URLs you get the error:

Not Found
The requested URL /suiteCRM/index.php was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

I’m not using the folder name suiteCRM!!!

I did a grep –r ‘suiteCRM’ * and I found config.php had site_url = http://localhost/suiteCRM;
I changed it to the address of my install

I cleared cache folder did repair and still this URL is 404 not found. So I checked .htaccess to look for rewrite directive to suiteCRM but did not find one. So why when you try to load these language JS files is the server responding that it is looking to suiteCRM folder/index.php when trying to load this JS file I wonder?

— UPDATE –

SO, for an experiment I made a duplicate copy of the folder I have SuiteCRM installed in but used the default suiteCRM folder name. Waalaa - fixed. So where the heck is the JS files getting the config that is telling it my install is in suiteCRM when it isn’t!?

I did this:

grep -r ‘suiteCRM’ *
install/language/es_es.lang.php: ‘LBL_PERFORM_CREATE_RELATIONSHIPS’ => ‘Creando tablas de relación para suiteCRM’,

Obviously that’s not where the config is. It’s like this folder setting must be encoded or something?

I think I’ve just uncovered a significant bug. I imagine it’s not more widely discussed because maybe many people choose the default folder name of suiteCRM? I prefer not to as it gives hackers even identification of the software you are using.

Problem Solved

WIth no config anywhere with suiteCRM I figured it had to be in .htaccess I guess I didn’t execute the grep command properly to make it also search .htaccess

RewriteBase was incorrectly set to the default install dir of suiteCRM

Just change it to the actual install dir

2 Likes

Hi jcrist,

Thanks for the info. The problem seems to be in htaccess file.

I have installed suitecrm in mysite.com/crm. However I’m using the subdomain to access my crm: crm.mysite.com. All the requests to mysite.com/crm are redirected to crm.mysite.com.

Here is the last few lines of htaccess file.

Options +FollowSymLinks RewriteEngine On RewriteBase /crm RewriteRule ^cache/jsLanguage/(.._..).js$ index.php?entryPoint=jslang&module=app_strings&lang=$1 [L,QSA] RewriteRule ^cache/jsLanguage/(\w*)/(.._..).js$ index.php?entryPoint=jslang&module=$1&lang=$2 [L,QSA] # END SUGARCRM RESTRICTIONS

Redirect to crm.mysite.com

RewriteEngine On
RewriteCond %{HTTP_HOST} ^(?:www.)?mysite.com$ [NC]
RewriteRule (.*) http://crm.mysite.com/$1 [NE,R=302,L]

When I tried to access http://crm.mysite.com/cache/jsLanguage/en_us.js?v=UdRFWZFf2o9goZrGoZr3og I got a 404 error. However I was able to access http://mysite.com/crm/cache/jsLanguage/en_us.js?v=UdRFWZFf2o9goZrGoZr3og.

I’m not good at editing htaccess. Can you please help me to resolve this?

Thanks,

Well,

I’m able to solve it.

uncommented this line in my htaccess:
RewriteBase /crm

Thanks for the support!

I had this problem too - just visiting mysite.com/crm in the browser worked for me…

I’m having a similar issue where cache/jsLanguage/en_us.js isn’t being loaded when I try to access the upgrade wizard.

I’ve tried copying the file from another installation, but it just gets deleted from the folder straight away.

But I don’t have a .htaccess file in my installation, so I can’t try the fixes mentioned.

I’m using SuiteCRM 7.9.7 on Ubuntu 16.04 with PHP 7.1

Any ideas?

This last thing worked for me as well. So the steps to get the Undefined issue resolved:

  • Set full permissions on /cache
  • Set full permission on /cache/jsLanguage
  • Remove /cache/jsLanguage files
  • Check config.php whether the site_url is pointing at your CRM directory or subdomain
  • Check .htaccess (please note that this file is invisible in the cPanel file manager, but not in an FTP client) and remove the rewritebase line.
  • Clear your browser cache, login fresh and do a Quick repair and rebuild.