Uncaught exception thrown in shutdown function

Created on 22 October 2020, about 4 years ago
Updated 16 February 2023, almost 2 years ago

I'm getting the following error on CRON runs:

Uncaught exception thrown in shutdown function.

Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'default.node__field_qbank_media' doesn't exist: SELECT fm.fid AS fid, fm.uri AS uri, fm.qbank_origin_id AS qbank_origin_id, fm.uid AS uid, fu.id AS id
FROM
{node__field_qbank_media} fqm
INNER JOIN {file_usage} fu ON fqm.field_qbank_media_target_id = fu.id
INNER JOIN {file_managed} fm ON fu.fid = fm.fid
WHERE (entity_id = :db_condition_placeholder_0) AND (fm.qbank_origin_type = :db_condition_placeholder_1) AND (fu.type = :db_condition_placeholder_2) UNION SELECT fm.fid AS fid, fm.uri AS uri, fm.qbank_origin_id AS qbank_origin_id, fm.uid AS uid, fu.id AS id
FROM
{file_usage} fu
INNER JOIN {file_managed} fm ON fu.fid = fm.fid
WHERE (fu.id = :db_condition_placeholder_3) AND (fm.qbank_origin_type = :db_condition_placeholder_4) AND (fu.type = :db_condition_placeholder_5); Array
(
    [:db_condition_placeholder_0] => 104309
    [:db_condition_placeholder_1] => qbank
    [:db_condition_placeholder_2] => media
    [:db_condition_placeholder_3] => 104309
    [:db_condition_placeholder_4] => qbank
    [:db_condition_placeholder_5] => node
)
 in Drupal\qbank_dam\QBankDAMService->qbankAddUsage() (line 507 of /var/www/web/modules/contrib/qbank_dam/src/QBankDAMService.php). 

Drupal\qbank_dam\QBankDAMService->qbankAddUsage(Object) (Line: 344)
Drupal\qbank_dam\QBankDAMService->addUsage(Object) (Line: 69)
qbank_dam_node_postsave(Object, 'update')
call_user_func_array('qbank_dam_node_postsave', Array) (Line: 403)
Drupal\Core\Extension\ModuleHandler->invokeAll('node_postsave', Array) (Line: 60)
_hook_post_action_post_save(Object, 'update') (Line: 1074)
_drupal_shutdown_function()

PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'default.node__field_qbank_media' doesn't exist in /var/www/web/core/lib/Drupal/Core/Database/Statement.php:59
Stack trace:
#0 /var/www/web/core/lib/Drupal/Core/Database/Statement.php(59): PDOStatement->execute(Array)
#1 /var/www/web/core/lib/Drupal/Core/Database/Connection.php(640): Drupal\Core\Database\Statement->execute(Array, Array)
#2 /var/www/web/core/lib/Drupal/Core/Database/Driver/mysql/Connection.php(357): Drupal\Core\Database\Connection->query('SELECT fm.fid A...', Array, Array)
#3 /var/www/web/core/lib/Drupal/Core/Database/Query/Select.php(510): Drupal\Core\Database\Driver\mysql\Connection->query('SELECT fm.fid A...', Array, Array)
#4 /var/www/web/modules/contrib/qbank_dam/src/QBankDAMService.php(507): Drupal\Core\Database\Query\Select->execute()
#5 /var/www/web/modules/contrib/qbank_dam/src/QBankDAMService.php(344): Drupal\qbank_dam\QBankDAMService->qbankAddUsage(Object(Drupal\node\Entity\Node))
#6 /var/www/web/modules/contrib/qbank_dam/qbank_dam.module(69): Drupal\qbank_dam\QBankDAMService->addUsage(Object(Drupal\node\Entity\Node))
#7 [internal function]: qbank_dam_node_postsave(Object(Drupal\node\Entity\Node), 'update')
#8 /var/www/web/core/lib/Drupal/Core/Extension/ModuleHandler.php(403): call_user_func_array('qbank_dam_node_...', Array)
#9 /var/www/web/modules/contrib/hook_post_action/hook_post_action.module(60): Drupal\Core\Extension\ModuleHandler->invokeAll('node_postsave', Array)
#10 /var/www/web/core/includes/bootstrap.inc(1074): _hook_post_action_post_save(Object(Drupal\node\Entity\Node), 'update')
#11 [internal function]: _drupal_shutdown_function()
#12 {main}

Next Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'default.node__field_qbank_media' doesn't exist: SELECT fm.fid AS fid, fm.uri AS uri, fm.qbank_origin_id AS qbank_origin_id, fm.uid AS uid, fu.id AS id
FROM
{node__field_qbank_media} fqm
INNER JOIN {file_usage} fu ON fqm.field_qbank_media_target_id = fu.id
INNER JOIN {file_managed} fm ON fu.fid = fm.fid
WHERE (entity_id = :db_condition_placeholder_0) AND (fm.qbank_origin_type = :db_condition_placeholder_1) AND (fu.type = :db_condition_placeholder_2) UNION SELECT fm.fid AS fid, fm.uri AS uri, fm.qbank_origin_id AS qbank_origin_id, fm.uid AS uid, fu.id AS id
FROM
{file_usage} fu
INNER JOIN {file_managed} fm ON fu.fid = fm.fid
WHERE (fu.id = :db_condition_placeholder_3) AND (fm.qbank_origin_type = :db_condition_placeholder_4) AND (fu.type = :db_condition_placeholder_5); Array
(
    [:db_condition_placeholder_0] => 104309
    [:db_condition_placeholder_1] => qbank
    [:db_condition_placeholder_2] => media
    [:db_condition_placeholder_3] => 104309
    [:db_condition_placeholder_4] => qbank
    [:db_condition_placeholder_5] => node
)
 in /var/www/web/core/lib/Drupal/Core/Database/Connection.php:701
Stack trace:
#0 /var/www/web/core/lib/Drupal/Core/Database/Connection.php(665): Drupal\Core\Database\Connection->handleQueryException(Object(PDOException), 'SELECT fm.fid A...', Array, Array)
#1 /var/www/web/core/lib/Drupal/Core/Database/Driver/mysql/Connection.php(357): Drupal\Core\Database\Connection->query('SELECT fm.fid A...', Array, Array)
#2 /var/www/web/core/lib/Drupal/Core/Database/Query/Select.php(510): Drupal\Core\Database\Driver\mysql\Connection->query('SELECT fm.fid A...', Array, Array)
#3 /var/www/web/modules/contrib/qbank_dam/src/QBankDAMService.php(507): Drupal\Core\Database\Query\Select->execute()
#4 /var/www/web/modules/contrib/qbank_dam/src/QBankDAMService.php(344): Drupal\qbank_dam\QBankDAMService->qbankAddUsage(Object(Drupal\node\Entity\Node))
#5 /var/www/web/modules/contrib/qbank_dam/qbank_dam.module(69): Drupal\qbank_dam\QBankDAMService->addUsage(Object(Drupal\node\Entity\Node))
#6 [internal function]: qbank_dam_node_postsave(Object(Drupal\node\Entity\Node), 'update')
#7 /var/www/web/core/lib/Drupal/Core/Extension/ModuleHandler.php(403): call_user_func_array('qbank_dam_node_...', Array)
#8 /var/www/web/modules/contrib/hook_post_action/hook_post_action.module(60): Drupal\Core\Extension\ModuleHandler->invokeAll('node_postsave', Array)
#9 /var/www/web/core/includes/bootstrap.inc(1074): _hook_post_action_post_save(Object(Drupal\node\Entity\Node), 'update')
#10 [internal function]: _drupal_shutdown_function()
#11 {main}
🐛 Bug report
Status

Fixed

Version

1.4

Component

Code

Created by

🇸🇪Sweden peter törnstrand

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024