Database failure. Please refer to suitecrm.log for details Account Module

Suite CRM 7.12.6
PHP 7.3.30
Centos

Hello, i have this problem in my account module :

In my log i have this :

Fri Aug 12 04:37:12 2022 [2536][79790303-4877-812e-309f-5c6ecc8423a2][FATAL] Mysqli_query failed.
Fri Aug 12 04:37:12 2022 [2536][79790303-4877-812e-309f-5c6ecc8423a2][FATAL] Error retrieving Account list:  Query Failed: (
    SELECT * FROM (
    SELECT 'opportunities_notes' AS panel_name,
'' date_start,
      o.id     AS parent_id,
      o.name   AS parent_name,
      'Opportunities' parent_type,
      t.id,
      t.name,
      '' AS status,
      IFNULL(t.date_modified, '') AS date_due,
      t.date_entered,
      t.date_modified,
      t.assigned_user_id
    FROM accounts_opportunities AS ao
    INNER JOIN opportunities AS o ON o.id = ao.opportunity_id 
    INNER JOIN notes AS t ON t.parent_id = o.id
    WHERE ao.account_id = '993932dd-dd94-4b17-2c12-5ebf91cb6411'
      AND ao.deleted = 0
      AND o.deleted = 0 
      AND t.deleted = 0
      
    UNION ALL
    SELECT 'opportunities_notes' AS panel_name,
'' date_start,
      a.id     AS parent_id,
      a.name   AS parent_name,
      'Accounts' parent_type,
      t.id,
      t.name,
      '' AS status,
      IFNULL(t.date_modified, '') AS date_due,
      t.date_entered,
      t.date_modified,
      t.assigned_user_id
    FROM notes AS t
    INNER JOIN accounts a ON a.id = t.parent_id
    WHERE t.parent_id = '993932dd-dd94-4b17-2c12-5ebf91cb6411'
      AND t.deleted = 0
      AND a.deleted = 0
      
      ) AS notes
   ) UNION ALL ( 
    SELECT * FROM (
    SELECT 'opportunities_tasks' AS panel_name, 
'' date_start,
      o.id     AS parent_id,
      o.name   AS parent_name,
      'Opportunities' parent_type,
      t.id,
      t.name,
      t.status,
      IFNULL(t.date_start, '') AS date_due,
      t.date_entered,
      t.date_modified,
      t.assigned_user_id
    FROM accounts_opportunities AS ao
    INNER JOIN opportunities AS o ON o.id = ao.opportunity_id 
    INNER JOIN tasks AS t ON t.parent_id = o.id
    WHERE ao.account_id = '993932dd-dd94-4b17-2c12-5ebf91cb6411'
      AND ao.deleted = 0
      AND o.deleted = 0 
      AND t.deleted = 0
      AND (t.status='Completed' OR t.status='Deferred')
    UNION ALL
    SELECT 'opportunities_tasks' AS panel_name, 
'' date_start,
      a.id     AS parent_id,
      a.name   AS parent_name,
      'Accounts' parent_type,
      t.id,
      t.name,
      t.status,
      IFNULL(t.date_start, '') AS date_due,
      t.date_entered,
      t.date_modified,
      t.assigned_user_id
    FROM tasks AS t
    INNER JOIN accounts a ON a.id = t.parent_id
    WHERE t.parent_id = '993932dd-dd94-4b17-2c12-5ebf91cb6411'
      AND t.deleted = 0
      AND a.deleted = 0
      AND (t.status='Completed' OR t.status='Deferred')
      ) AS tasks
    ) UNION ALL ( 
    SELECT * FROM (
    SELECT 'opportunities_meetings' AS panel_name,
'' date_start,
      o.id     AS parent_id,
      o.name   AS parent_name,
      'Opportunities' parent_type,
      t.id,
      t.name,
      t.status,
      IFNULL(t.date_end, '') AS date_due,
      t.date_entered,
      t.date_modified,
      t.assigned_user_id
    FROM accounts_opportunities AS ao
    INNER JOIN opportunities AS o ON o.id = ao.opportunity_id 
    INNER JOIN meetings AS t ON t.parent_id = o.id
    WHERE ao.account_id = '993932dd-dd94-4b17-2c12-5ebf91cb6411'
      AND ao.deleted = 0
      AND o.deleted = 0 
      AND t.deleted = 0
      AND (t.status='Held' OR t.status='Not Held')
    UNION ALL
    SELECT 'opportunities_meetings' AS panel_name,
'' date_start,
      a.id     AS parent_id,
      a.name   AS parent_name,
      'Accounts' parent_type,
      t.id,
      t.name,
      t.status,
      IFNULL(t.date_end, '') AS date_due,
      t.date_entered,
      t.date_modified,
      t.assigned_user_id
    FROM meetings AS t
    INNER JOIN accounts a ON a.id = t.parent_id
    WHERE t.parent_id = '993932dd-dd94-4b17-2c12-5ebf91cb6411'
      AND t.deleted = 0
      AND a.deleted = 0
      AND (t.status='Held' OR t.status='Not Held')
      ) AS meetings
    ) UNION ALL ( 
    SELECT * FROM (
    SELECT 'opportunities_calls' AS panel_name,
'' date_start,
      o.id     AS parent_id,
      o.name   AS parent_name,
      'Opportunities' parent_type,
      t.id,
      t.name,
      t.status,
      IFNULL(t.date_end, '') AS date_due,
      t.date_entered,
      t.date_modified,
      t.assigned_user_id
    FROM accounts_opportunities AS ao
    INNER JOIN opportunities AS o ON o.id = ao.opportunity_id 
    INNER JOIN calls AS t ON t.parent_id = o.id
    WHERE ao.account_id = '993932dd-dd94-4b17-2c12-5ebf91cb6411'
      AND ao.deleted = 0
      AND o.deleted = 0 
      AND t.deleted = 0
      AND (t.status = 'Held' OR t.status = 'Not Held')
    UNION ALL
    SELECT 'opportunities_calls' AS panel_name,
'' date_start,
      a.id     AS parent_id,
      a.name   AS parent_name,
      'Accounts' parent_type,
      t.id,
      t.name,
      t.status,
      IFNULL(t.date_end, '') AS date_due,
      t.date_entered,
      t.date_modified,
      t.assigned_user_id
    FROM calls AS t
    INNER JOIN accounts a ON a.id = t.parent_id
    WHERE t.parent_id = '993932dd-dd94-4b17-2c12-5ebf91cb6411'
      AND t.deleted = 0
      AND a.deleted = 0
      AND (t.status = 'Held' OR t.status = 'Not Held')
      ) AS calls
    ) UNION ALL ( 
    SELECT * FROM (
    SELECT 'opportunities_emails' AS panel_name,
'' date_start,
      o.id     AS parent_id,
      o.name   AS parent_name,
      'Opportunities' parent_type,
      t.id,
      t.name,
      t.status AS status,
      IFNULL(t.date_sent, '') AS date_due,
      t.date_entered,
      t.date_modified,
      t.assigned_user_id
    FROM accounts_opportunities AS ao
    INNER JOIN opportunities AS o ON o.id = ao.opportunity_id 
    INNER JOIN emails AS t ON t.parent_id = o.id
    WHERE ao.account_id = '993932dd-dd94-4b17-2c12-5ebf91cb6411'
      AND ao.deleted = 0
      AND o.deleted = 0 
      AND t.deleted = 0
      
    UNION ALL
    SELECT 'opportunities_emails' AS panel_name,
'' date_start,
      a.id     AS parent_id,
      a.name   AS parent_name,
      'Accounts' parent_type,
      t.id,
      t.name,
      t.status AS status,
      IFNULL(t.date_sent, '') AS date_due,
      t.date_entered,
      t.date_modified,
      t.assigned_user_id
    FROM emails AS t
    INNER JOIN accounts a ON a.id = t.parent_id
    WHERE t.parent_id = '993932dd-dd94-4b17-2c12-5ebf91cb6411'
      AND t.deleted = 0
      AND a.deleted = 0
      
      ) AS emails
    ) ORDER BY date_entered desc LIMIT 0,16: MySQL error 1054: Unknown column 't.date_sent' in 'field list'
Fri Aug 12 04:37:12 2022 [2536][79790303-4877-812e-309f-5c6ecc8423a2][FATAL] [ListView::processUnionBeans] . Défaillance de la base de données. Veuillez consulter suitecrm.log pour plus de détails.
Fri Aug 12 04:37:14 2022 [2309][79790303-4877-812e-309f-5c6ecc8423a2][FATAL] Exception handling in /var/www/html/suitecrm/include/MVC/Controller/SugarController.php:397
Fri Aug 12 04:37:14 2022 [2309][79790303-4877-812e-309f-5c6ecc8423a2][FATAL] Exception in Controller: <div class='pv-error'>Choose template from list to preview.</div>
Fri Aug 12 04:38:01 2022 [2614][1][FATAL] Mysqli_query failed.
Fri Aug 12 04:38:01 2022 [2614][1][FATAL]  Query Failed: SELECT aos_invoices.id AS id FROM aos_invoices  WHERE aos_invoices.aos_product_categories_id_c != '855e108d-3586-66f1-41ba-5c868764c367' AND NOT EXISTS (SELECT * FROM aow_processed WHERE aow_processed.aow_workflow_id='a75715f4-806d-8fa2-71a2-5de53689678e' AND aow_processed.parent_id=aos_invoices.id AND aow_processed.status = 'Complete' AND aow_processed.deleted = 0) AND aos_invoices.deleted = 0 : MySQL error 1054: Unknown column 'aos_invoices.aos_product_categories_id_c' in 'where clause'
Fri Aug 12 04:39:02 2022 [2627][1][FATAL] Mysqli_query failed.
Fri Aug 12 04:39:02 2022 [2627][1][FATAL]  Query Failed: SELECT aos_invoices.id AS id FROM aos_invoices  WHERE aos_invoices.aos_product_categories_id_c != '855e108d-3586-66f1-41ba-5c868764c367' AND NOT EXISTS (SELECT * FROM aow_processed WHERE aow_processed.aow_workflow_id='a75715f4-806d-8fa2-71a2-5de53689678e' AND aow_processed.parent_id=aos_invoices.id AND aow_processed.status = 'Complete' AND aow_processed.deleted = 0) AND aos_invoices.deleted = 0 : MySQL error 1054: Unknown column 'aos_invoices.aos_product_categories_id_c' in 'where clause'

I have tried repair and rebuild, but nothing …
Have you an Idea ?
Thanks in avance
Quentin

hello,
I figured it out.
I deleted the “a75715f4-806d-8fa2-71a2-5de53689678e” in the database with Phpmyadmin
Then for the error “Unknown column’t. date_sent’ in ‘field list’” I found a custom file that made this request that blocked on the “Account” module. I fixed calling this file in “layoutdefs.ext.php” in custom/module/account/ext.
Beautiful day to all
Quentin