Weird Email client problem

Version 7.10.30 Sugar Version 6.5.25 (Build 344) on Unbuntu 20.04

Here’s a weird problem, that’s causing me major problems. I’ve consolidated it as much as I can.

I changed the profile from the Suitecrm email client to the external client, then changed back to send out some emails using templates.

The external email client works fine, but when I went back to the suitecrm client this happened

If I cancel it, I get this

I can’t select templates or fill in the email

But…

When I login as admin, the email client behaves, templates work. I can click on an email address of a contact and the suitecrm email client behaves perfectly. I can select a template it all works perfectly

When logged in as me, the email works if I go to Emails->Compose email,
but if I click on a contact’s email I still get the above error, the client doesn’t work. But if I go to Email-> compose email it works fine.

I’d be very grateful for any help you could give me.

Thanks

Hi,
Did you allowed admin user email settings to regular users?

@JulianHarmer

Check the permissions. Some js files isn’t loading.

Hi Ashis,

Yes I tried that and it didnt work for me, I’d have thought it would.

Thanks

Hi P.Konetskiy,

Here’s the commands I issued from the link you sent over.

root@suitecrm:~# cd /var/www/html/suitecrm/
root@suitecrm:/var/www/html/suitecrm# ls
Api export.php ModuleInstall suitecrm_06_22_21_1.log suitecrm.log.old
cache files.md5 modules suitecrm_06_22_21.log suitecrm.log.original
campaign_tracker.php HandleAjaxCall.php pdf.php suitecrm_06_23_21.log suitecrm_version.php
composer.json ical_server.php php_version.php suitecrm_06_24_21.log themes
composer.lock include public suitecrm_1.log TreeData.php
config_override.php index.php README.md suitecrm_2.log upgradeWizard.log
config.php install RoboFile.php suitecrm_3.log upload
config.php-original install.log robots.txt suitecrm_4.log vcal_server.php
cron.php install.php run_job.php suitecrm_5.log vCard.php
crossdomain.xml json_server.php service suitecrm_6.log vendor
custom jssource soap suitecrm_7.log XTemplate
data lib soap.php suitecrm_8.log Zend
deprecated.php LICENSE.txt sugarcrm.log suitecrm_9.log
dictionary.php log_file_restricted.html SugarSecurity.php suitecrm.log
download.php maintenance.php sugar_version.json suitecrm.log.2
emailmandelivery.php metadata sugar_version.php suitecrm.log-copy
root@suitecrm:/var/www/html/suitecrm# ls …
index.html suitecrm
root@suitecrm:/var/www/html/suitecrm# sudo chown -R www-data:www-data .
root@suitecrm:/var/www/html/suitecrm# sudo chmod -R 755 .
root@suitecrm:/var/www/html/suitecrm# sudo chmod -R 775 cache custom modules themes data upload
root@suitecrm:/var/www/html/suitecrm# sudo chmod 775 config_override.php 2>/dev/null

Unfortunately the problem persists. What would you suggest?

Thanks

@JulianHarmer

Are you sure that owner of your web server is www-data?

Hi , Thanks for the suggestion.
from here, https://serverfault.com/questions/125865/finding-out-what-user-apache-is-running-as
I got the following
root@suitecrm:~# ps -ef | egrep ‘(httpd|apache2|apache)’ | grep -v whoami | grep -v root | head -n1 | awk ‘{print $1}’
www-data
So it appears to be www-data

@JulianHarmer

OK. I have last idea only - clear the browser cache.

Thanks for the suggestion, but I’ve tried that. I’ve exhausted my ideas too.
Is there a way of getting further help?
Thanks

@JulianHarmer
Install new copy of SuiteCRM for testing.

Thanks for that, I’ve installed a new instance of SuiteCRM and it works fine !!
But I think I know what happened, I just don’t know how to fix it…

I had an older version of Suitecrm, which I upgraded to 7.10.30, but realised the base OS was out of support the following week. So I created a new VM, with Ubuntu 20.04, put SuiteCRM on it, then copied all files/folders from the original the suiteCRM directory over from the VM with the old OS to the VM with the new OS.

So did the copy go as it should? I suspect this may be the cause, or more likley the default "copied"rights. It works fine on the fresh install, can I copy a subset from there to the faulty SuiteCRM installation? If so what permissions need to be set?

Thanks, I believe we’re on the right track.

@JulianHarmer

Look at my the first post in this discussion. There is the link on documentation about permissions.

Thanks for that, you don’t happen to know which folders would be relevant to the internal email client

Try a few different repairs from Admin / Repair. Sometimes after permissions get messed up, these need to be reapplied.

Currently, do you get the problem in your first screenshot, in the second screenshot, or both? I am talking about the ones in your original post above.

Hi Pgr,

I get the problem in the first screenshot, then when I select delete I get the second screenshot

Thanks

Hi pgr,

I ran every repair option, but unfortunately the problem persists.

I’ve been looking at the fresh install and everything works perfectly, the only difference between them is the copying over my old install on top of my new one, both 7.30.10 What folders are relevant to to the email client? I’d like to copy my fresh install’s folders over the email side of the faulty one and see if that makes a difference.

Thanks

It’s not simple, the module pulls files from many places.

What I find strange about your issue is that what you are seeing is a bug that is already fixed in 7.10.30. Strangely, the fix is not taking effect, possibly because of the permission problems you had earlier.

Try deleting everything in this folder (it will all get re-created):

cache/smarty/templates_c

and in this one:

themes/SuiteP/modules/Emails

Hi,

I’ve been doing some more researching. Building SuiteCRM servers. corrupting them, building new ones etc.

I’ve found the problem is some how related to the database. As soon as I exported and imported the database to another server the problem followed it

I used this to export it

sudo mysqldump -u root -p yetiforce > dbexport.sql

and this to re import it.

sudo mysql -u username -p dbname < dbexport.sql

Getting Closer !!

Any suggestions?

Is your DB import/export being made between matching versions of SuiteCRM?

Yes, that’s the weird thing, all versions are 7.10.30