Contacts info not rendered and other errors after migration to another host

I migrated out SuiteCRM instance to another host using the recipe from Procedure for migrating suitecrm to another server

I now see several issues on the new instance:

  • Custom fields are not shown for accounts
  • Contact details are not shown (“Overview” and “More Information” contains no info)
  • Many warnings in suitecrm.log
  • JavaScript errors in browser console
  • Diagnostics does not create diagnostic archives

For example when clicking on a specific contact I get following output in suitecrm.log (LogLevel = warn):

Wed Jul  3 10:14:44 2024 [6311][1][WARN] ModuleNameMapper | mapName | 'contacts' not mapped to 'frontend'
Wed Jul  3 10:14:44 2024 [6311][1][DEPRECATED] Array
(
)

Wed Jul  3 10:14:44 2024 [6311][1][ERROR] Unable to find relationship projects_contacts_resources
Wed Jul  3 10:14:44 2024 [6311][1][WARN] project_resource for projects_contacts_resources failed to load

Wed Jul  3 10:14:44 2024 [6311][1][ERROR] Unable to find relationship am_projecttemplates_contacts_resources
Wed Jul  3 10:14:44 2024 [6311][1][WARN] am_projecttemplates_resources for am_projecttemplates_contacts_resources failed to load

Wed Jul  3 10:14:44 2024 [6311][1][WARN] Confirm Opt in is disabled in email settings
Wed Jul  3 10:14:44 2024 [6311][1][WARN] Confirm Opt in is disabled in email settings
Wed Jul  3 10:14:45 2024 [6311][1][ERROR] Unable to find relationship projects_contacts_resources
Wed Jul  3 10:14:45 2024 [6311][1][WARN] project_resource for projects_contacts_resources failed to load

Wed Jul  3 10:14:45 2024 [6311][1][ERROR] Unable to find relationship am_projecttemplates_contacts_resources
Wed Jul  3 10:14:45 2024 [6311][1][WARN] am_projecttemplates_resources for am_projecttemplates_contacts_resources failed to load

Wed Jul  3 10:14:45 2024 [6311][1][WARN] Email ID is Empty
Wed Jul  3 10:14:45 2024 [6311][1][WARN] Email ID is Empty
Wed Jul  3 10:14:45 2024 [6274][1][DEPRECATED] Array
(
)

Wed Jul  3 10:14:45 2024 [6274][1][DEPRECATED] Array
(
)

Wed Jul  3 10:14:45 2024 [6311][1][WARN] Confirm Opt in is disabled in email settings
Wed Jul  3 10:14:45 2024 [6311][1][WARN] Confirm Opt in is disabled in email settings
Wed Jul  3 10:14:45 2024 [6311][1][WARN] Confirm Opt in is disabled in email settings
Wed Jul  3 10:14:45 2024 [6311][1][WARN] Confirm Opt in is disabled in email settings
Wed Jul  3 10:14:45 2024 [6311][-none-][WARN] ModuleNameMapper | toLegacy | 'Contacts' not mapped
Wed Jul  3 10:14:45 2024 [6311][1][WARN] ModuleNameMapper | toLegacy | 'Contacts' not mapped
Wed Jul  3 10:14:45 2024 [6311][1][WARN] ModuleNameMapper | toLegacy | 'Contacts' not mapped

When clicking on an Account the log displays:

Wed Jul  3 10:23:41 2024 [6273][1][WARN] ModuleNameMapper | mapName | 'accounts' not mapped to 'frontend'
Wed Jul  3 10:23:41 2024 [6273][1][DEPRECATED] Array
(
)

Wed Jul  3 10:23:41 2024 [6273][1][WARN] Confirm Opt in is disabled in email settings
Wed Jul  3 10:23:41 2024 [6273][1][WARN] Confirm Opt in is disabled in email settings
Wed Jul  3 10:23:41 2024 [6273][1][WARN] Email ID is Empty
Wed Jul  3 10:23:41 2024 [6273][1][WARN] Confirm Opt in is disabled in email settings
Wed Jul  3 10:23:41 2024 [6273][1][WARN] Confirm Opt in is disabled in email settings
Wed Jul  3 10:23:41 2024 [6273][1][WARN] Confirm Opt in is disabled in email settings
Wed Jul  3 10:23:41 2024 [6273][1][WARN] Confirm Opt in is disabled in email settings
Wed Jul  3 10:23:42 2024 [6273][-none-][WARN] ModuleNameMapper | toLegacy | 'Accounts' not mapped
Wed Jul  3 10:23:42 2024 [6273][1][WARN] ModuleNameMapper | toLegacy | 'Accounts' not mapped
Wed Jul  3 10:23:42 2024 [6273][1][WARN] ModuleNameMapper | toLegacy | 'Accounts' not mapped

When creating a diagnostic archive the progress stays at 0% and the log shows:

Wed Jul  3 11:13:58 2024 [5815][1][WARN] ModuleNameMapper | mapName | 'administration' not mapped to 'frontend'
Wed Jul  3 11:13:58 2024 [5815][1][DEPRECATED] Array
(
)

Wed Jul  3 11:14:00 2024 [5815][1][DEPRECATED] Array
(
)

Wed Jul  3 11:14:00 2024 [5815][1][DEPRECATED] Array
(
)

Wed Jul  3 11:14:02 2024 [6313][1][WARN] ModuleNameMapper | mapName | 'administration' not mapped to 'frontend'
Wed Jul  3 11:14:02 2024 [5815][1][DEPRECATED] Array
(
)

Wed Jul  3 11:14:02 2024 [5815][1][WARN] CSS File Dawn/yui.css not found
Wed Jul  3 11:14:09 2024 [60369][1][DEPRECATED] Array
(
)

Wed Jul  3 11:14:09 2024 [60369][1][WARN] CSS File Dawn/yui.css not found
Wed Jul  3 11:14:09 2024 [60369][1][WARN] ModuleNameMapper | mapName | 'administration' not mapped to 'frontend'
Wed Jul  3 11:14:09 2024 [60369][1][DEPRECATED] Array
(
)

Wed Jul  3 11:14:09 2024 [60369][1][WARN] CSS File Dawn/yui.css not found

I tried several repair steps and rename cache directories, which didn’t help.

Another interesting output is from doctrine:mapping:info:

root@crm:/var/www/suitecrm# sudo -u www-data bin/console doctrine:mapping:info
PHP Deprecated:  Return type of Symfony\Component\HttpFoundation\Session\Attribute\AttributeBag::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/suitecrm/vendor/symfony/http-foundation/Session/Attribute/AttributeBag.php on line 134
PHP Deprecated:  Return type of Symfony\Component\HttpFoundation\Session\Attribute\AttributeBag::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/suitecrm/vendor/symfony/http-foundation/Session/Attribute/AttributeBag.php on line 144
PHP Deprecated:  Return type of Symfony\Component\HttpFoundation\Session\Session::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/suitecrm/vendor/symfony/http-foundation/Session/Session.php on line 131
PHP Deprecated:  Return type of Symfony\Component\HttpFoundation\Session\Session::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/suitecrm/vendor/symfony/http-foundation/Session/Session.php on line 141

 Found 1 mapped entities:

 [OK]   App\Module\Users\Entity\User

Any idea how to fix that or what is the underlying problem?

Maybe you need to check file permissions and ownership. Run symfony command to repair.

Then, maybe you need to run repair from the admin dashboard

Thanks for the reply. How exactly do I run the “symfony command”?

When running Quick Repair and Rebuild the log shows following output:

Wed Jul  3 16:14:20 2024 [6311][1][WARN] CSS File Dawn/yui.css not found
Wed Jul  3 16:14:20 2024 [6311][1][WARN] QRR: directory not found: cache/include/InlineEditing/
Wed Jul  3 16:14:20 2024 [6311][1][WARN] QRR: directory not found: cache/xml
Wed Jul  3 16:14:20 2024 [6311][1][WARN] SugarBean constructor error: Object has not fields in dictionary. Object name was: Audit
Wed Jul  3 16:14:20 2024 [6311][1][WARN] Audit::populateDefaultValues $field_defs should be an array
Wed Jul  3 16:14:21 2024 [6311][1][WARN] Audit::populateDefaultValues $field_defs should be an array
Wed Jul  3 16:14:21 2024 [6311][1][WARN] SugarBean constructor error: Object has not fields in dictionary. Object name was: Audit
Wed Jul  3 16:14:21 2024 [6311][1][WARN] Audit::populateDefaultValues $field_defs should be an array
Wed Jul  3 16:14:52 2024 [60369][1][WARN] Cannot find bean file for module: Connectors
Wed Jul  3 16:14:52 2024 [60369][1][WARN] Cannot find bean file for module: Connectors
Wed Jul  3 16:14:52 2024 [60369][1][WARN] Cannot find bean file for module: Versions
Wed Jul  3 16:14:52 2024 [60369][1][WARN] Cannot find bean file for module: Versions
Wed Jul  3 16:14:52 2024 [60369][1][WARN] Cannot find bean file for module: CustomFields
Wed Jul  3 16:14:52 2024 [60369][1][WARN] Cannot find bean file for module: CustomFields
Wed Jul  3 16:14:52 2024 [60369][1][WARN] Cannot find bean file for module: Connectors
Wed Jul  3 16:14:52 2024 [60369][1][WARN] Cannot find bean file for module: Connectors
Wed Jul  3 16:14:52 2024 [60369][1][WARN] Cannot find bean file for module: Versions
Wed Jul  3 16:14:52 2024 [60369][1][WARN] Cannot find bean file for module: Versions
Wed Jul  3 16:14:52 2024 [60369][1][WARN] Cannot find bean file for module: CustomFields
Wed Jul  3 16:14:52 2024 [60369][1][WARN] Cannot find bean file for module: CustomFields
Wed Jul  3 16:14:52 2024 [60369][1][DEPRECATED] Array

Resolution

This issue can be resolved by re-setting permissions and running ./bin/console clear:cache within the SuiteCRM 8 root directory.

You should then be able to navigate to your application.

Hello,

one idea if your server keeps on giving you a hard time / it is more than the permissions:

In a vhost on the same server with everything else the same, you can just download a new Suite 8.6.1 and just check the Pre-Install Check Page - is the server ‘ready’ for SuiteCRM?

Thanks again @BastianHammer and @rsp:

  • I re-set permissions and cleared the cache → no success
  • I copied over the cache folder from the old instance, cleared cache, quick repaired → no success
  • I created a new vhost and unzipped the 8.6.1 archive for install pre-check → all OK except IMAP and LDAP (not related to my problem I guess)

Does any of those log lines critical (or can they be ignored)?

  • Wed Jul 3 10:14:44 2024 [6311][1][WARN] ModuleNameMapper | mapName | 'contacts' not mapped to 'frontend'
  • Wed Jul 3 10:14:45 2024 [6311][1][WARN] ModuleNameMapper | toLegacy | 'Contacts' not mapped
  • Thu Jul 4 09:29:00 2024 [13484][1][ERROR] Unable to find relationship projects_contacts_resources
  • Wed Jul 3 10:14:44 2024 [6311][1][WARN] project_resource for projects_contacts_resources failed to load

I would install the IMAP and LDAP modules, if I were you. Missing modules are FATAL errors, and FATAL errors interrupt code execution. Who knows what else breaks, after that…?

At least, it’s worth a try