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
Thanks. I ran those find
commands and these were the results. I am not sure what to make of this?
/var/www/suitecrm$ sudo find . -type d -not -perm 2755
./public/legacy/cache/jsLanguage/Calls
./public/legacy/cache/jsLanguage/Documents
./public/legacy/cache/themes/suite8/modules
./public/legacy/cache/themes/suite8/modules/Calls
./public/legacy/cache/themes/suite8/modules/Documents
/var/www/suitecrm$ sudo find . -type f -not -perm 0644
./cache/prod/doctrine/orm/Proxies/__CG__AppModuleUsersEntityUser.php
./bin/console
./public/legacy/cache/jsLanguage/en_us.js
./public/legacy/cache/Relationships/relationships.cache.php
./public/legacy/cache/modules/EmailText/EmailTextvardefs.php
./public/legacy/cache/modules/ModuleBuilder/language/en_us.lang.php
./public/legacy/cache/modules/Tasks/Taskvardefs.php
./public/legacy/cache/modules/Tasks/language/en_us.lang.php
./public/legacy/cache/modules/AOW_Actions/AOW_Actionvardefs.php
./public/legacy/cache/modules/AOW_Actions/language/en_us.lang.php
./public/legacy/cache/modules/SurveyResponses/SurveyResponsesvardefs.php
./public/legacy/cache/modules/SurveyResponses/language/en_us.lang.php
./public/legacy/cache/modules/Campaigns/Campaignvardefs.php
./public/legacy/cache/modules/Campaigns/language/en_us.lang.php
./public/legacy/cache/modules/AOW_WorkFlow/AOW_WorkFlowvardefs.php
./public/legacy/cache/modules/AOW_WorkFlow/language/en_us.lang.php
./public/legacy/cache/modules/EAPM/EAPMvardefs.php
./public/legacy/cache/modules/EAPM/language/en_us.lang.php
./public/legacy/cache/modules/Trackers/Trackervardefs.php
./public/legacy/cache/modules/Trackers/language/en_us.lang.php
./public/legacy/cache/modules/Import_1/ImportMapvardefs.php
./public/legacy/cache/modules/Import/ImportMapvardefs.php
./public/legacy/cache/modules/Import/UsersLastImportvardefs.php
./public/legacy/cache/modules/Import/language/en_us.lang.php
./public/legacy/cache/modules/LabelEditor/language/en_us.lang.php
./public/legacy/cache/modules/AOS_Line_Item_Groups/AOS_Line_Item_Groupsvardefs.php
./public/legacy/cache/modules/AOS_Line_Item_Groups/language/en_us.lang.php
./public/legacy/cache/modules/Activities/language/en_us.lang.php
./public/legacy/cache/modules/Leads/Leadvardefs.php
./public/legacy/cache/modules/Leads/language/en_us.lang.php
./public/legacy/cache/modules/Emails/Emailvardefs.php
./public/legacy/cache/modules/Emails/language/en_us.lang.php
./public/legacy/cache/modules/Employees/Employeevardefs.php
./public/legacy/cache/modules/Employees/language/en_us.lang.php
./public/legacy/cache/modules/AOR_Conditions/AOR_Conditionvardefs.php
./public/legacy/cache/modules/AOR_Conditions/language/en_us.lang.php
./public/legacy/cache/modules/TemplateSectionLine/TemplateSectionLinevardefs.php
./public/legacy/cache/modules/TemplateSectionLine/language/en_us.lang.php
./public/legacy/cache/modules/OAuthKeys/OAuthKeyvardefs.php
./public/legacy/cache/modules/OAuthKeys/language/en_us.lang.php
./public/legacy/cache/modules/AOS_Products_Quotes/AOS_Products_Quotesvardefs.php
./public/legacy/cache/modules/AOS_Products_Quotes/language/en_us.lang.php
./public/legacy/cache/modules/Surveys/Surveysvardefs.php
./public/legacy/cache/modules/Surveys/language/en_us.lang.php
./public/legacy/cache/modules/FP_events/FP_eventsvardefs.php
./public/legacy/cache/modules/FP_events/language/en_us.lang.php
./public/legacy/cache/modules/vCals/vCalvardefs.php
./public/legacy/cache/modules/SurveyQuestionResponses/SurveyQuestionResponsesvardefs.php
./public/legacy/cache/modules/SurveyQuestionResponses/language/en_us.lang.php
./public/legacy/cache/modules/AOS_Contracts/AOS_Contractsvardefs.php
./public/legacy/cache/modules/AOS_Contracts/language/en_us.lang.php
./public/legacy/cache/modules/Reminders/Remindervardefs.php
./public/legacy/cache/modules/Reminders/language/en_us.lang.php
./public/legacy/cache/modules/Contacts/Contactvardefs.php
./public/legacy/cache/modules/Contacts/language/en_us.lang.php
./public/legacy/cache/modules/EmailMarketing/EmailMarketingvardefs.php
./public/legacy/cache/modules/EmailMarketing/language/en_us.lang.php
./public/legacy/cache/modules/Currencies/Currencyvardefs.php
./public/legacy/cache/modules/Currencies/language/en_us.lang.php
./public/legacy/cache/modules/InboundEmail/InboundEmailvardefs.php
./public/legacy/cache/modules/InboundEmail/language/en_us.lang.php
./public/legacy/cache/modules/Help/language/en_us.lang.php
./public/legacy/cache/modules/Cases/Casevardefs.php
./public/legacy/cache/modules/Cases/language/en_us.lang.php
./public/legacy/cache/modules/SugarFeed/SugarFeedvardefs.php
./public/legacy/cache/modules/SugarFeed/language/en_us.lang.php
./public/legacy/cache/modules/jjwg_Address_Cache/jjwg_Address_Cachevardefs.php
./public/legacy/cache/modules/jjwg_Address_Cache/language/en_us.lang.php
./public/legacy/cache/modules/ACLRoles/ACLRolevardefs.php
./public/legacy/cache/modules/ACLRoles/language/en_us.lang.php
./public/legacy/cache/modules/AOR_Charts/AOR_Chartvardefs.php
./public/legacy/cache/modules/AOR_Charts/language/en_us.lang.php
./public/legacy/cache/modules/EmailAddresses/EmailAddressvardefs.php
./public/legacy/cache/modules/EmailAddresses/language/en_us.lang.php
./public/legacy/cache/modules/DocumentRevisions/DocumentRevisionvardefs.php
./public/legacy/cache/modules/DocumentRevisions/language/en_us.lang.php
./public/legacy/cache/modules/Users/Uservardefs.php
./public/legacy/cache/modules/Users/language/en_us.lang.php
./public/legacy/cache/modules/AM_ProjectTemplates/AM_ProjectTemplatesvardefs.php
./public/legacy/cache/modules/AM_ProjectTemplates/language/en_us.lang.php
./public/legacy/cache/modules/OptimisticLock/language/en_us.lang.php
./public/legacy/cache/modules/Bugs/Bugvardefs.php
./public/legacy/cache/modules/Bugs/language/en_us.lang.php
./public/legacy/cache/modules/SavedSearch/SavedSearchvardefs.php
./public/legacy/cache/modules/SavedSearch/language/en_us.lang.php
./public/legacy/cache/modules/Notes/Notevardefs.php
./public/legacy/cache/modules/Notes/language/en_us.lang.php
./public/legacy/cache/modules/MergeRecords/language/en_us.lang.php
./public/legacy/cache/modules/MergeRecords/MergeRecordvardefs.php
./public/legacy/cache/modules/Groups/Uservardefs.php
./public/legacy/cache/modules/Groups/language/en_us.lang.php
./public/legacy/cache/modules/CampaignLog/CampaignLogvardefs.php
./public/legacy/cache/modules/CampaignLog/language/en_us.lang.php
./public/legacy/cache/modules/Studio/language/en_us.lang.php
./public/legacy/cache/modules/AOP_Case_Updates/AOP_Case_Updatesvardefs.php
./public/legacy/cache/modules/AOP_Case_Updates/language/en_us.lang.php
./public/legacy/cache/modules/ACLActions/ACLActionvardefs.php
./public/legacy/cache/modules/ACLActions/language/en_us.lang.php
./public/legacy/cache/modules/ExternalOAuthConnection/ExternalOAuthConnectionvardefs.php
./public/legacy/cache/modules/ExternalOAuthConnection/language/en_us.lang.php
./public/legacy/cache/modules/Meetings/Meetingvardefs.php
./public/legacy/cache/modules/Meetings/language/en_us.lang.php
./public/legacy/cache/modules/Reminders_Invitees/Reminder_Inviteevardefs.php
./public/legacy/cache/modules/Reminders_Invitees/language/en_us.lang.php
./public/legacy/cache/modules/AOR_Fields/AOR_Fieldvardefs.php
./public/legacy/cache/modules/AOR_Fields/language/en_us.lang.php
./public/legacy/cache/modules/Project/Projectvardefs.php
./public/legacy/cache/modules/Project/language/en_us.lang.php
./public/legacy/cache/modules/Roles/Rolevardefs.php
./public/legacy/cache/modules/Roles/language/en_us.lang.php
./public/legacy/cache/modules/jjwg_Markers/jjwg_Markersvardefs.php
./public/legacy/cache/modules/jjwg_Markers/language/en_us.lang.php
./public/legacy/cache/modules/ProspectLists/ProspectListvardefs.php
./public/legacy/cache/modules/ProspectLists/language/en_us.lang.php
./public/legacy/cache/modules/Releases/Releasevardefs.php
./public/legacy/cache/modules/Releases/language/en_us.lang.php
./public/legacy/cache/modules/SchedulersJobs/SchedulersJobvardefs.php
./public/legacy/cache/modules/SchedulersJobs/language/en_us.lang.php
./public/legacy/cache/modules/SurveyQuestionOptions/SurveyQuestionOptionsvardefs.php
./public/legacy/cache/modules/SurveyQuestionOptions/language/en_us.lang.php
./public/legacy/cache/modules/EditCustomFields/FieldsMetaDatavardefs.php
./public/legacy/cache/modules/AOR_Scheduled_Reports/AOR_Scheduled_Reportsvardefs.php
./public/legacy/cache/modules/AOR_Scheduled_Reports/language/en_us.lang.php
./public/legacy/cache/modules/Accounts/Accountvardefs.php
./public/legacy/cache/modules/Accounts/language/en_us.lang.php
./public/legacy/cache/modules/OAuth2Tokens/OAuth2Tokensvardefs.php
./public/legacy/cache/modules/OAuth2Tokens/language/en_us.lang.php
./public/legacy/cache/modules/Alerts/Alertvardefs.php
./public/legacy/cache/modules/Alerts/language/en_us.lang.php
./public/legacy/cache/modules/AOK_Knowledge_Base_Categories/AOK_Knowledge_Base_Categoriesvardefs.php
./public/legacy/cache/modules/AOK_Knowledge_Base_Categories/language/en_us.lang.php
./public/legacy/cache/modules/ProjectTask/ProjectTaskvardefs.php
./public/legacy/cache/modules/ProjectTask/language/en_us.lang.php
./public/legacy/cache/modules/Import_2/UsersLastImportvardefs.php
./public/legacy/cache/modules/EmailMan/EmailManvardefs.php
./public/legacy/cache/modules/EmailMan/language/en_us.lang.php
./public/legacy/cache/modules/OAuthTokens/OAuthTokenvardefs.php
./public/legacy/cache/modules/OAuthTokens/language/en_us.lang.php
./public/legacy/cache/modules/EmailTemplates/EmailTemplatevardefs.php
./public/legacy/cache/modules/EmailTemplates/language/en_us.lang.php
./public/legacy/cache/modules/AOS_Quotes/AOS_Quotesvardefs.php
./public/legacy/cache/modules/AOS_Quotes/language/en_us.lang.php
./public/legacy/cache/modules/Calendar/language/en_us.lang.php
./public/legacy/cache/modules/AOS_Products/AOS_Productsvardefs.php
./public/legacy/cache/modules/AOS_Products/language/en_us.lang.php
./public/legacy/cache/modules/History/language/en_us.lang.php
./public/legacy/cache/modules/Calls/Callvardefs.php
./public/legacy/cache/modules/Calls/language/en_us.lang.php
./public/legacy/cache/modules/UserPreferences/UserPreferencevardefs.php
./public/legacy/cache/modules/CampaignTrackers/CampaignTrackervardefs.php
./public/legacy/cache/modules/CampaignTrackers/language/en_us.lang.php
./public/legacy/cache/modules/MailMerge/language/en_us.lang.php
./public/legacy/cache/modules/Relationships/Relationshipvardefs.php
./public/legacy/cache/modules/Relationships/relationships.cache.php
./public/legacy/cache/modules/jjwg_Areas/jjwg_Areasvardefs.php
./public/legacy/cache/modules/jjwg_Areas/language/en_us.lang.php
./public/legacy/cache/modules/AOBH_BusinessHours/AOBH_BusinessHoursvardefs.php
./public/legacy/cache/modules/AOBH_BusinessHours/language/en_us.lang.php
./public/legacy/cache/modules/Home/language/en_us.lang.php
./public/legacy/cache/modules/ExternalOAuthProvider/ExternalOAuthProvidervardefs.php
./public/legacy/cache/modules/ExternalOAuthProvider/language/en_us.lang.php
./public/legacy/cache/modules/Calls_Reschedule/Calls_Reschedulevardefs.php
./public/legacy/cache/modules/Calls_Reschedule/language/en_us.lang.php
./public/legacy/cache/modules/AOW_Conditions/language/en_us.lang.php
./public/legacy/cache/modules/AOW_Conditions/AOW_Conditionvardefs.php
./public/legacy/cache/modules/ACL/language/en_us.lang.php
./public/legacy/cache/modules/Configurator/language/en_us.lang.php
./public/legacy/cache/modules/Documents/Documentvardefs.php
./public/legacy/cache/modules/Documents/language/en_us.lang.php
./public/legacy/cache/modules/SecurityGroups/SecurityGroupvardefs.php
./public/legacy/cache/modules/SecurityGroups/language/en_us.lang.php
./public/legacy/cache/modules/OutboundEmailAccounts/OutboundEmailAccountsvardefs.php
./public/legacy/cache/modules/OutboundEmailAccounts/language/en_us.lang.php
./public/legacy/cache/modules/AOS_Invoices/AOS_Invoicesvardefs.php
./public/legacy/cache/modules/AOS_Invoices/language/en_us.lang.php
./public/legacy/cache/modules/AOK_KnowledgeBase/AOK_KnowledgeBasevardefs.php
./public/legacy/cache/modules/AOK_KnowledgeBase/language/en_us.lang.php
./public/legacy/cache/modules/Connectors/language/en_us.lang.php
./public/legacy/cache/modules/OAuth2Clients/OAuth2Clientsvardefs.php
./public/legacy/cache/modules/OAuth2Clients/language/en_us.lang.php
./public/legacy/cache/modules/AM_TaskTemplates/AM_TaskTemplatesvardefs.php
./public/legacy/cache/modules/AM_TaskTemplates/language/en_us.lang.php
./public/legacy/cache/modules/UpgradeWizard/language/en_us.lang.php
./public/legacy/cache/modules/Prospects/Prospectvardefs.php
./public/legacy/cache/modules/Prospects/language/en_us.lang.php
./public/legacy/cache/modules/FP_Event_Locations/FP_Event_Locationsvardefs.php
./public/legacy/cache/modules/FP_Event_Locations/language/en_us.lang.php
./public/legacy/cache/modules/DynamicFields/FieldsMetaDatavardefs.php
./public/legacy/cache/modules/DynamicFields/language/en_us.lang.php
./public/legacy/cache/modules/AOW_Processed/AOW_Processedvardefs.php
./public/legacy/cache/modules/AOW_Processed/language/en_us.lang.php
./public/legacy/cache/modules/Opportunities/Opportunityvardefs.php
./public/legacy/cache/modules/Opportunities/language/en_us.lang.php
./public/legacy/cache/modules/AOS_Product_Categories/AOS_Product_Categoriesvardefs.php
./public/legacy/cache/modules/AOS_Product_Categories/language/en_us.lang.php
./public/legacy/cache/modules/Schedulers/Schedulervardefs.php
./public/legacy/cache/modules/Schedulers/language/en_us.lang.php
./public/legacy/cache/modules/jjwg_Maps/jjwg_Mapsvardefs.php
./public/legacy/cache/modules/jjwg_Maps/language/en_us.lang.php
./public/legacy/cache/modules/Administration/UpgradeHistoryvardefs.php
./public/legacy/cache/modules/Administration/language/en_us.lang.php
./public/legacy/cache/modules/Administration/Administrationvardefs.php
./public/legacy/cache/modules/AOS_PDF_Templates/AOS_PDF_Templatesvardefs.php
./public/legacy/cache/modules/AOS_PDF_Templates/language/en_us.lang.php
./public/legacy/cache/modules/SurveyQuestions/SurveyQuestionsvardefs.php
./public/legacy/cache/modules/SurveyQuestions/language/en_us.lang.php
./public/legacy/cache/modules/AOR_Reports/AOR_Reportvardefs.php
./public/legacy/cache/modules/AOR_Reports/language/en_us.lang.php
./public/legacy/cache/modules/Favorites/Favoritesvardefs.php
./public/legacy/cache/modules/Favorites/language/en_us.lang.php
./public/legacy/cache/modules/Audit/Auditvardefs.php
./public/legacy/cache/modules/Audit/language/en_us.lang.php
./public/legacy/cache/modules/AOP_Case_Events/AOP_Case_Eventsvardefs.php
./public/legacy/cache/modules/AOP_Case_Events/language/en_us.lang.php
./public/legacy/cache/dashlets/dashlets.php
./public/legacy/cache/themes/suite8/pathCache.php
./public/legacy/cache/themes/suite8/modules/Calls/EditView.tpl
./public/legacy/cache/themes/suite8/modules/Documents/EditView.tpl
/var/www/suitecrm$ sudo find . ! -user www-data
$
pgr
13 August 2024 12:01
47
If you can match these directories to errors currently appearing in the logs, then that would confirm that SuiteCRM is having permissions problems writing and reading from the cache.
Further things to check:
your default_permissions
array in public/legacy/config.php
Linux things on your server that could be interfering: SELinux, any security software
more Linux things: umask configurations, the SetGID and SetOID bits on directory permissions (although that 2
in 2755
should take care of thisā¦ )
other programs touching those same files: main suspect is cron running SuiteCRM schedulers under a different user name; but also kinds of user access such as SSH or FTP if you used them and did something there