Do you have any custom code or add-on? ![]()
Search that string with a âfind in filesâ or grep -irn
You will likely find it in more than one place, one that is the input of a Quick Repair and Rebuild, the other is the output. You need to change the input.
So, I moved everything to a completely new machine and I have some interesting conclusions:
- I made clean install on completely new computer instance, this version worked correctly
- I restored database to new database and basically just replaced the database in confing files - this also works correctly with a caveat that configuration of my subpanels was not transfered and labels of my custom fields did not exist (so I could see âdefaultâ data, but not my customizations)
- I have then tried to decide which files from my old custom folder I need to copy to the new instance. I do not understand custom folder fully to have a smart decision on what to copy or not so in the end I copied whole custom folder and when I did that my whole instance broke in exactly the same way like my old machine
- so now we know that whatever happened, happened in my custom folder
Thankfully, if I remove custom folder and rebuild cache, it starts working again (although not all custom files are there).
Is there any documentation about the anatomy of custom folder and what is safe to copy/remove or not?
(I am interested to learn where are located custom modules, where is kept information about custom fields and subpanel/screen cofiguration - most of my custom work was done within Contacts module).
Thatâs interesting. Same custom files were working in 8.8.1 for you.
What if you move all folder from custom except the modules one? If that work, then we know it is an issue with modules folder.
What is not safe to copy or remove in custom folder?
The reference to media_objects that is causing a Fatal error - fix that and all your systems (old and new) should be operational again.
Yes, I removed modules directory from customs and everything appears to work.
The trick is that all of my studio customizations are there. So now I have to add module by module back to see which one breaks the install. Interesting.
I donât think you need to do all that guesswork⌠you can follow the specific clues you have ![]()
What do you get when you run this from the SuiteCRM directory?
grep -irn media_objects .
ZERO
but, media_objects are mentioned in plenty of other places:
./public/legacy/include/portability/Schedulers/PruneDatabaseService.php:46: âarchived_documents_media_objectsâ => âArchivedDocumentMediaObjectâ,
./public/legacy/include/portability/Schedulers/PruneDatabaseService.php:47: âprivate_documents_media_objectsâ => âPrivateDocumentMediaObjectâ,
./public/legacy/include/portability/Schedulers/PruneDatabaseService.php:48: âprivate_images_media_objectsâ => âPrivateImageMediaObjectâ,
./public/legacy/include/portability/Schedulers/PruneDatabaseService.php:49: âpublic_documents_media_objectsâ => âPublicDocumentMediaObjectâ,
./public/legacy/include/portability/Schedulers/PruneDatabaseService.php:50: âpublic_images_media_objectsâ => âPublicImageMediaObjectâ,
./public/legacy/include/portability/Schedulers/PruneDatabaseService.php:51: âmedia_objectsâ => âMediaObjectâ,
./public/legacy/cache/Relationships/relationships.cache.php:15004: ârhs_tableâ => âpublic_images_media_objectsâ,
./public/legacy/cache/Relationships/relationships.cache.php:15015: ârhs_tableâ => âpublic_images_media_objectsâ,
./public/legacy/cache/Relationships/relationships.cache.php:15026: ârhs_tableâ => âpublic_images_media_objectsâ,
./public/legacy/cache/Relationships/relationships.cache.php:15037: ârhs_tableâ => âpublic_images_media_objectsâ,
./public/legacy/cache/modules/Relationships/relationships.cache.php:771: ârhs_tableâ => âarchived_documents_media_objectsâ,
./public/legacy/cache/modules/Relationships/relationships.cache.php:3678: ârhs_tableâ => âarchived_documents_media_objectsâ,
./public/legacy/cache/modules/Relationships/relationships.cache.php:5863: ârhs_tableâ => âarchived_documents_media_objectsâ,
./public/legacy/cache/modules/Relationships/relationships.cache.php:7364: ârhs_tableâ => âarchived_documents_media_objectsâ,
./public/legacy/cache/modules/MediaObjects/ArchivedDocumentMediaObjectvardefs.php:3: âtableâ => âarchived_documents_media_objectsâ,
./public/legacy/cache/modules/MediaObjects/ArchivedDocumentMediaObjectvardefs.php:284: ârhs_tableâ => âarchived_documents_media_objectsâ,
./public/legacy/cache/modules/MediaObjects/ArchivedDocumentMediaObjectvardefs.php:294: ârhs_tableâ => âarchived_documents_media_objectsâ,
./public/legacy/cache/modules/MediaObjects/ArchivedDocumentMediaObjectvardefs.php:304: ârhs_tableâ => âarchived_documents_media_objectsâ,
./public/legacy/cache/modules/MediaObjects/ArchivedDocumentMediaObjectvardefs.php:314: ârhs_tableâ => âarchived_documents_media_objectsâ,
./public/legacy/cache/modules/MediaObjects/PrivateDocumentMediaObjectvardefs.php:3: âtableâ => âprivate_documents_media_objectsâ,
./public/legacy/cache/modules/MediaObjects/PrivateDocumentMediaObjectvardefs.php:284: ârhs_tableâ => âprivate_documents_media_objectsâ,
./public/legacy/cache/modules/MediaObjects/PrivateDocumentMediaObjectvardefs.php:294: ârhs_tableâ => âprivate_documents_media_objectsâ,
./public/legacy/cache/modules/MediaObjects/PrivateDocumentMediaObjectvardefs.php:304: ârhs_tableâ => âprivate_documents_media_objectsâ,
./public/legacy/cache/modules/MediaObjects/PrivateDocumentMediaObjectvardefs.php:314: ârhs_tableâ => âprivate_documents_media_objectsâ,
./public/legacy/cache/modules/MediaObjects/PrivateImageMediaObjectvardefs.php:3: âtableâ => âprivate_images_media_objectsâ,
./public/legacy/cache/modules/MediaObjects/PrivateImageMediaObjectvardefs.php:284: ârhs_tableâ => âprivate_images_media_objectsâ,
./public/legacy/cache/modules/MediaObjects/PrivateImageMediaObjectvardefs.php:294: ârhs_tableâ => âprivate_images_media_objectsâ,
./public/legacy/cache/modules/MediaObjects/PrivateImageMediaObjectvardefs.php:304: ârhs_tableâ => âprivate_images_media_objectsâ,
./public/legacy/cache/modules/MediaObjects/PrivateImageMediaObjectvardefs.php:314: ârhs_tableâ => âprivate_images_media_objectsâ,
./public/legacy/cache/modules/MediaObjects/PublicDocumentMediaObjectvardefs.php:3: âtableâ => âpublic_documents_media_objectsâ,
./public/legacy/cache/modules/MediaObjects/PublicDocumentMediaObjectvardefs.php:284: ârhs_tableâ => âpublic_documents_media_objectsâ,
./public/legacy/cache/modules/MediaObjects/PublicDocumentMediaObjectvardefs.php:294: ârhs_tableâ => âpublic_documents_media_objectsâ,
./public/legacy/cache/modules/MediaObjects/PublicDocumentMediaObjectvardefs.php:304: ârhs_tableâ => âpublic_documents_media_objectsâ,
./public/legacy/cache/modules/MediaObjects/PublicDocumentMediaObjectvardefs.php:314: ârhs_tableâ => âpublic_documents_media_objectsâ,
./public/legacy/cache/modules/MediaObjects/PublicImageMediaObjectvardefs.php:3: âtableâ => âpublic_images_media_objectsâ,
./public/legacy/cache/modules/MediaObjects/PublicImageMediaObjectvardefs.php:284: ârhs_tableâ => âpublic_images_media_objectsâ,
./public/legacy/cache/modules/MediaObjects/PublicImageMediaObjectvardefs.php:294: ârhs_tableâ => âpublic_images_media_objectsâ,
./public/legacy/cache/modules/MediaObjects/PublicImageMediaObjectvardefs.php:304: ârhs_tableâ => âpublic_images_media_objectsâ,
./public/legacy/cache/modules/MediaObjects/PublicImageMediaObjectvardefs.php:314: ârhs_tableâ => âpublic_images_media_objectsâ,
./public/legacy/modules/MediaObjects/vardefs.php:79: âtableâ => âarchived_documents_media_objectsâ,
./public/legacy/modules/MediaObjects/vardefs.php:94: âtableâ => âprivate_documents_media_objectsâ,
./public/legacy/modules/MediaObjects/vardefs.php:109: âtableâ => âprivate_images_media_objectsâ,
./public/legacy/modules/MediaObjects/vardefs.php:124: âtableâ => âpublic_documents_media_objectsâ,
./public/legacy/modules/MediaObjects/vardefs.php:139: âtableâ => âpublic_images_media_objectsâ,
./public/legacy/modules/MediaObjects/PublicImageMediaObject.php:35: public $table_name = âpublic_images_media_objectsâ;
./public/legacy/modules/MediaObjects/PrivateDocumentMediaObject.php:35: public $table_name = âprivate_documents_media_objectsâ;
./public/legacy/modules/MediaObjects/ArchivedDocumentMediaObject.php:35: public $table_name = âarchived_documents_media_objectsâ;
./public/legacy/modules/MediaObjects/MediaObject.php:34: public $table_name = âmedia_objectsâ;
./public/legacy/modules/MediaObjects/PublicDocumentMediaObject.php:35: public $table_name = âpublic_documents_media_objectsâ;
./public/legacy/modules/MediaObjects/PrivateImageMediaObject.php:35: public $table_name = âprivate_images_media_objectsâ;
./core/backend/Schedulers/Service/Scheduler/Jobs/CleanUpTemporaryFilesScheduler.php:63: âarchived-documentsâ => âarchived_documents_media_objectsâ,
./core/backend/Schedulers/Service/Scheduler/Jobs/CleanUpTemporaryFilesScheduler.php:64: âprivate-documentsâ => âprivate_documents_media_objectsâ,
./core/backend/Schedulers/Service/Scheduler/Jobs/CleanUpTemporaryFilesScheduler.php:65: âprivate-imagesâ => âprivate_images_media_objectsâ,
./core/backend/Schedulers/Service/Scheduler/Jobs/CleanUpTemporaryFilesScheduler.php:66: âpublic-documentsâ => âpublic_documents_media_objectsâ,
./core/backend/Schedulers/Service/Scheduler/Jobs/CleanUpTemporaryFilesScheduler.php:67: âpublic-imagesâ => âpublic_images_media_objectsâ
./core/backend/MediaObjects/Entity/PublicImageMediaObject.php:48:#[ORM\Table(name: âpublic_images_media_objectsâ)]
./core/backend/MediaObjects/Entity/PrivateDocumentMediaObject.php:48:#[ORM\Table(name: âprivate_documents_media_objectsâ)]
./core/backend/MediaObjects/Entity/ArchivedDocumentMediaObject.php:47:#[ORM\Table(name: âarchived_documents_media_objectsâ)]
./core/backend/MediaObjects/Entity/PublicDocumentMediaObject.php:48:#[ORM\Table(name: âpublic_documents_media_objectsâ)]
./core/backend/MediaObjects/Entity/PrivateImageMediaObject.php:48:#[ORM\Table(name: âprivate_images_media_objectsâ)]
./cache/prod/doctrine/orm/default_metadata.php:334: ânameâ => âarchived_documents_media_objectsâ,
./cache/prod/doctrine/orm/default_metadata.php:691: ânameâ => âprivate_documents_media_objectsâ,
./cache/prod/doctrine/orm/default_metadata.php:1048: ânameâ => âprivate_images_media_objectsâ,
./cache/prod/doctrine/orm/default_metadata.php:1405: ânameâ => âpublic_documents_media_objectsâ,
./cache/prod/doctrine/orm/default_metadata.php:1762: ânameâ => âpublic_images_media_objectsâ,
./logs/legacy/suitecrm.log:6:Wed Dec 3 2025 at 10:17:10 [56818][1][FATAL] createRelationshipMeta: Metadata for table media_objects does not exist
./logs/legacy/suitecrm.log:7:Wed Dec 3 2025 at 10:32:04 [56818][1][FATAL] createRelationshipMeta: Metadata for table media_objects does not exist
./logs/legacy/suitecrm.log:8:Wed Dec 3 2025 at 10:32:08 [102911][1][FATAL] createRelationshipMeta: Metadata for table media_objects does not exist
./logs/legacy/suitecrm.log:9:Wed Dec 3 2025 at 10:32:12 [102937][1][FATAL] createRelationshipMeta: Metadata for table media_objects does not exist
./logs/legacy/suitecrm.log:7765:Thu Dec 4 2025 at 16:45:17 [311497][1][FATAL] createRelationshipMeta: Metadata for table media_objects does not exist
./logs/legacy/suitecrm.log:7780:Thu Dec 4 2025 at 16:49:31 [311488][1][FATAL] createRelationshipMeta: Metadata for table media_objects does not exist
./logs/legacy/suitecrm.log:8274:Fri Dec 5 2025 at 08:05:21 [316131][1][FATAL] createRelationshipMeta: Metadata for table media_objects does not exist
./logs/install.log:558:[2025-12-336 14:16:57] install.FATAL: create_tables: Metadata for table media_objects does not exist
./logs/install.log:559:[2025-12-336 14:16:57] install.FATAL: createRelationshipMeta: Metadata for table media_objects does not exist
./logs/install.log:563:[2025-12-336 14:17:08] install.FATAL: createRelationshipMeta: Metadata for table media_objects does not exist
./logs/install.log:874:[2025-12-02 14:17:09] install.INFO: processing table media_objects
./logs/install.log:875:[2025-12-02 14:17:09] install.INFO: creating table media_objects
./logs/install.log:877:[2025-12-02 14:17:09] install.INFO: processing table archived_documents_media_objects
./logs/install.log:878:[2025-12-02 14:17:09] install.INFO: creating table archived_documents_media_objects
./logs/install.log:880:[2025-12-02 14:17:09] install.INFO: processing table private_documents_media_objects
./logs/install.log:881:[2025-12-02 14:17:09] install.INFO: creating table private_documents_media_objects
./logs/install.log:883:[2025-12-02 14:17:09] install.INFO: processing table private_images_media_objects
./logs/install.log:884:[2025-12-02 14:17:09] install.INFO: creating table private_images_media_objects
./logs/install.log:886:[2025-12-02 14:17:09] install.INFO: processing table public_documents_media_objects
./logs/install.log:887:[2025-12-02 14:17:09] install.INFO: creating table public_documents_media_objects
./logs/install.log:889:[2025-12-02 14:17:09] install.INFO: processing table public_images_media_objects
./logs/install.log:890:[2025-12-02 14:17:09] install.INFO: creating table public_images_media_objects
If I understand everything right, all of this was introduced with 8.9?
But, this also means that my case is unrelated to this.
Yeah, it is part of v8.9.1
Use correct quotes (make sure youâre using correct curly quotes)
âmedia_objectsâ => âMediaObjectâ
Delete these folders:
rm -rf public/legacy/cache/*
rm -rf cache/*
Then run:
php bin/console cache:clear
run Quick Repair & Rebuild
What is you create that table manually?
creating table media_objects
CREATE TABLE `media_objects` (
`id` char(36) NOT NULL,
`name` varchar(255) DEFAULT NULL,
`file_ext` varchar(10) DEFAULT NULL,
`mime_type` varchar(100) DEFAULT NULL,
`filename` varchar(255) DEFAULT NULL,
`created_at` datetime DEFAULT NULL,
`updated_at` datetime DEFAULT NULL,
`deleted` tinyint(1) NOT NULL DEFAULT 0,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
Ok, so itâs a new addition to core SuiteCRM.
The Quick Repair and Rebuild typically detects inconsisitencies between vardefs and DB, and if you scroll down, at the bottom it offers a button to fix this (run SQL like the one @rsp provided). Have you seen/tried that?
quick repair did not detect this or did not report it
All of this fixes did not solve my issue at all, so what I did do is that I have started moving directory by directory from my backup to legacy/custom/modules
I have moved about half of my modules and will try to the same with the rest tomorrow.
(it is slow because I need to reset chmod and chown + cache every time I do something)
Interestingly, when I break my suitecrm instance, the moment I remove custom modules it returns to default suitecrm state (no cache purge needed, menues return with first refresh)
The custom stuff is not just in /custom directory.
Stuff coming from Module builder goes in /modules (I wish it didnât! The proper place would be /custom/modules)
If you still see a FATAL error in your logs when it breaks, you could try getting a proper stack trace of it; that, and a bit extra logging, would take you directly to the offending file.
I have (finally) figured out WHERE this corruption is happening.
It happens in:
/var/www/suitecrm/public/legacy/custom/modules/Emails
As soon as I remove Emails directory, my navigation returns immediately (but this custom/module directory gets recreated quite soon).
It took me some time to this figure out (waaay too much time). Once we determined that something there is creating an issue I tried removing all content and adding parts of the code one by one and I thought everything is fine but after some time user interface would fail again (and I can not say that this is related to cache issues, I have reset everything I know including my browser cache; made whole script just to reset everything properly after any change).
In the end, I found problematic module by looking at time stamps of the files (and the latest changes were in Emails module).
Now, the thing is that I havenât changed anything in Emails, and whatever happened there was automaticaly generated. I donât have a clue why or how it happened.
As a precaution I have deleted outbound email accounts and recreated them from zero. I will monitor everything closely to see if everything continues to work ok.
p.s. now I know: if I go to studio and try to change something in views of Emails module (for example width of columns in list view) and try to Save&Deploy, it will create file in folder: /var/www/suitecrm/public/legacy/custom/modules/Emails/metadata/listviewdefs.php and this will break the suitecrm
You should have same files in the Email folder.
Do you need to edit email module from studio?
What I wanted to do is to adjust widths of columns in my list view, and for this I needed studio.
By default all columns are set to be 32% (total of about 170%) and in my case even short email subject ends up being three lines and then whole list is cumbersome to navigate. I really do not care for this module (at this time), but it looked like a simple thing to do and it crashed whole instance.
Youâre correct. I changed the width for subject in list view of Email module from the Studio and it broke the system.
public/legacy/custom/modules/Emails/metadata
'SUBJECT' =>
array (
'width' => '44%',
'label' => 'LBL_LIST_SUBJECT',
'default' => true,
'link' => false,
'customCode' => '',
'sortable' => false,
),
I reset permissions and clear symfony cache and it did not fix it.
How can I fix my instance?
remove this file:
/var/www/suitecrm/public/legacy/custom/modules/Emails/metadata/listviewdefs.php
(this is path on my server, yours might be different)
Yes! I removed metadata folder and it is working now.
Could you please raise an issue on GitHub?
Thank you!