rsp:
config_override.php
I ran that but it did NOT solve the page not displaying properly
sudo -u www-data ./bin/console cache:clear
// Clearing the cache for the prod environment with debug false
[OK] Cache for the "prod" environment (debug=false) was successfully cleared.
rsp:
Go to admin → Themes.
Otherwise, check if you have theme set in config_override.php
Otherwise, go to cache folder and delete theme folder and it will automatically get create on refresh.
config_override.php
looks like this:
<?php
/***CONFIGURATOR***/
$sugar_config['disable_persistent_connections'] = false;
$sugar_config['dbconfigoption']['collation'] = 'utf8_general_ci';
$sugar_config['default_currency_iso4217'] = 'ZAR';
$sugar_config['default_currency_name'] = 'Rand';
$sugar_config['default_currency_symbol'] = 'R';
$sugar_config['default_module_favicon'] = false;
$sugar_config['dashlet_auto_refresh_min'] = '30';
$sugar_config['stack_trace_errors'] = false;
/***CONFIGURATOR***/
I deleted the theme
folder in the .../public/legacy/cache
but still getting experiencing the same issue.
I just found another error in my log that I somehow missed: Guess I was only looking for PHP errors.
[2024-08-08 15:56:57] request.ERROR: Uncaught PHP Exception Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException: "Invalid CSRF token" at /var/www/suitecrm8/core/backend/Security/CSRFValidationListener.php line 95 {"exception":"[object] (Symfony\\Component\\HttpKernel\\Exception\\AccessDeniedHttpException(code: 0): Invalid CSRF token at /var/www/suitecrm8/core/backend/Security/CSRFValidationListener.php:95)"} []
I somehow feel this may be the cause of my issue. Any idea how to fix it?
rsp
8 August 2024 18:39
29
There are topics on this error in this forum, you can search it.
We were facing similar issue, in our case issue was cached files.
After clearing cache files as shown below
rm -rf cache
rm -rf public/legacy/cache
It started working
Thanks - I did see those and have been testing most of them but I have not found a solution that works yet
rsp
8 August 2024 18:46
31
Here they’re saying to update composer but it is 7.11 version.
rsp:
update composer
Should I run composer update
in the SuiteCRM main directory, or the .../public/legacy
or in both of them?
rsp
8 August 2024 19:00
33
Sorry I don’t know.
First:
sudo apt install composer
After:
composer install --no-dev
It worked for me.
Are you trying this on dev machine?
rsp
8 August 2024 19:06
35
Right click on page and go to inspect. Go to console or network tab. Check what are errors you have there. Maybe it will help you to find solution.
Checked again but no errors - only a few warnings
rsp
8 August 2024 20:11
37
It is difficult to find a problem. Maybe it will only work on PHP 8.1 or 8.2
But then the docs should not say it works with PHP 7.4.
I just wish I could debug the problem better as the only error I’m still seeing is this:
[2024-08-08 20:50:58] request.ERROR: Uncaught PHP Exception Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException: "Invalid CSRF token" at /var/www/suitecrm8/core/backend/Security/CSRFValidationListener.php line 95 {"exception":"[object] (Symfony\\Component\\HttpKernel\\Exception\\AccessDeniedHttpException(code: 0): Invalid CSRF token at /var/www/suitecrm8/core/backend/Security/CSRFValidationListener.php:95)"} []
rsp
8 August 2024 20:51
39
Maybe try another browser or clear cache on the current browser.
I did try both Chrome and Firefox.
What should your entries be in config.php
. Mine are as follows:
'host_name' => 'crm3.mydomain.com',
'site_url' => 'https://crm3.mydomain.com',
rsp
8 August 2024 21:38
41
You can try:
‘host_name’ => ‘IP_ADDRESS’
‘site_url’ => ‘https://crm3.mydomain.com:443 ’
Okay tried that but no change:
I also tried:
‘host_name’ => ‘localhost’
pgr
9 August 2024 09:20
43
My earlier suggestion of using the vendor folders as they come, was meant to eliminate all the complexities of composer install/update. There are some.
If I were you I would stick to that situation and try to solve the other error you got at that time. After that, with the correct PHP version, correct ownerships and permissions, and perhaps one of those Symfony cache:clear commands, you should really be in standard territory, working with a set up that is highly tested.
I am assuming you don’t have any add-ons or customizations that might be causing trouble, that could be another vector to investigate.
pgr:
If I were you I would stick to that situation and try to solve the other error you got at that time. After that, with the correct PHP version, correct ownerships and permissions, and perhaps one of those Symfony cache:clear commands, you should really be in standard territory, working with a set up that is highly tested.
I don’t have any add-ons or customization’s.
Okay so I re-did both vendor
folders and both the default
and suite8
themes across too.
I reset ownership and permissions. I then did a cache-clear.
BUT I still get the same issues with no errors in the browser or any of the logs.
What is weird though is the a lot of the pages seem to work except the Home page, About page and pages where you input data. See screenshots.
pgr
9 August 2024 18:35
45
Ok. In that state, can you use the find commands without the exec parts to simply check if something is messing your ownerships or permissions?
sudo find . -type d -not -perm 2755
sudo find . -type f -not -perm 0644
sudo find . ! -user www-data