While I try to open Media page in Drupal, it throws error. Below is the error I got from log file.
[Tue Nov 08 13:56:43.430322 2022] [php7:notice] [pid 27740:tid 1920] [client 127.0.0.1:50949] TypeError: Argument 1 passed to Drupal\\Core\\Entity\\Sql\\DefaultTableMapping::requiresDedicatedTableStorage() must implement interface Drupal\\Core\\Field\\FieldStorageDefinitionInterface, null given, called in E:\\work\\xampp_74\\htdocs\\Drupal\\slac-it\\web\\core\\lib\\Drupal\\Core\\Entity\\Sql\\DefaultTableMapping.php on line 334 in E:\\work\\xampp_74\\htdocs\\Drupal\\slac-it\\web\\core\\lib\\Drupal\\Core\\Entity\\Sql\\DefaultTableMapping.php on line 535 #0 E:\\work\\xampp_74\\htdocs\\Drupal\\slac-it\\web\\core\\lib\\Drupal\\Core\\Entity\\Sql\\DefaultTableMapping.php(334): Drupal\\Core\\Entity\\Sql\\DefaultTableMapping->requiresDedicatedTableStorage(NULL)\n#1 E:\\work\\xampp_74\\htdocs\\Drupal\\slac-it\\web\\core\\lib\\Drupal\\Core\\Entity\\Query\\Sql\\Tables.php(468): Drupal\\Core\\Entity\\Sql\\DefaultTableMapping->getAllColumns('media_field_dat...')\n#2 E:\\work\\xampp_74\\htdocs\\Drupal\\slac-it\\web\\core\\lib\\Drupal\\Core\\Entity\\Query\\Sql\\Tables.php(212): Drupal\\Core\\Entity\\Query\\Sql\\Tables->getTableMapping('media_field_dat...', 'media')\n#3 E:\\work\\xampp_74\\htdocs\\Drupal\\slac-it\\web\\core\\lib\\Drupal\\Core\\Entity\\Query\\Sql\\Query.php(295): Drupal\\Core\\Entity\\Query\\Sql\\Tables->addField('changed', 'LEFT', NULL)\n#4 E:\\work\\xampp_74\\htdocs\\Drupal\\slac-it\\web\\core\\lib\\Drupal\\Core\\Entity\\Query\\Sql\\Query.php(196): Drupal\\Core\\Entity\\Query\\Sql\\Query->getSqlField('changed', NULL)\n#5 E:\\work\\xampp_74\\htdocs\\Drupal\\slac-it\\web\\core\\lib\\Drupal\\Core\\Entity\\Query\\Sql\\Query.php(81): Drupal\\Core\\Entity\\Query\\Sql\\Query->addSort()\n#6 E:\\work\\xampp_74\\htdocs\\Drupal\\slac-it\\web\\core\\modules\\media\\src\\MediaListBuilder.php(159): Drupal\\Core\\Entity\\Query\\Sql\\Query->execute()\n#7 E:\\work\\xampp_74\\htdocs\\Drupal\\slac-it\\web\\core\\lib\\Drupal\\Core\\Entity\\EntityListBuilder.php(86): Drupal\\media\\MediaListBuilder->getEntityIds()\n#8 E:\\work\\xampp_74\\htdocs\\Drupal\\slac-it\\web\\core\\lib\\Drupal\\Core\\Entity\\EntityListBuilder.php(218): Drupal\\Core\\Entity\\EntityListBuilder->load()\n#9 E:\\work\\xampp_74\\htdocs\\Drupal\\slac-it\\web\\core\\lib\\Drupal\\Core\\Entity\\Controller\\EntityListController.php(23): Drupal\\Core\\Entity\\EntityListBuilder->render()\n#10 [internal function]: Drupal\\Core\\Entity\\Controller\\EntityListController->listing('media')\n#11 E:\\work\\xampp_74\\htdocs\\Drupal\\slac-it\\web\\core\\lib\\Drupal\\Core\\EventSubscriber\\EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array(Array, Array)\n#12 E:\\work\\xampp_74\\htdocs\\Drupal\\slac-it\\web\\core\\lib\\Drupal\\Core\\Render\\Renderer.php(564): Drupal\\Core\\EventSubscriber\\EarlyRenderingControllerWrapperSubscriber->Drupal\\Core\\EventSubscriber\\{closure}()\n#13 E:\\work\\xampp_74\\htdocs\\Drupal\\slac-it\\web\\core\\lib\\Drupal\\Core\\EventSubscriber\\EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\\Core\\Render\\Renderer->executeInRenderContext(Object(Drupal\\Core\\Render\\RenderContext), Object(Closure))\n#14 E:\\work\\xampp_74\\htdocs\\Drupal\\slac-it\\web\\core\\lib\\Drupal\\Core\\EventSubscriber\\EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\\Core\\EventSubscriber\\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array)\n#15 E:\\work\\xampp_74\\htdocs\\Drupal\\slac-it\\vendor\\symfony\\http-kernel\\HttpKernel.php(169): Drupal\\Core\\EventSubscriber\\EarlyRenderingControllerWrapperSubscriber->Drupal\\Core\\EventSubscriber\\{closure}()\n#16 E:\\work\\xampp_74\\htdocs\\Drupal\\slac-it\\vendor\\symfony\\http-kernel\\HttpKernel.php(81): Symfony\\Component\\HttpKernel\\HttpKernel->handleRaw(Object(Symfony\\Component\\HttpFoundation\\Request), 1)\n#17 E:\\work\\xampp_74\\htdocs\\Drupal\\slac-it\\web\\core\\lib\\Drupal\\Core\\StackMiddleware\\Session.php(58): Symfony\\Component\\HttpKernel\\HttpKernel->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)\n#18 E:\\work\\xampp_74\\htdocs\\Drupal\\slac-it\\web\\core\\lib\\Drupal\\Core\\StackMiddleware\\KernelPreHandle.php(48): Drupal\\Core\\StackMiddleware\\Session->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)\n#19 E:\\work\\xampp_74\\htdocs\\Drupal\\slac-it\\web\\core\\modules\\page_cache\\src\\StackMiddleware\\PageCache.php(106): Drupal\\Core\\StackMiddleware\\KernelPreHandle->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)\n#20 E:\\work\\xampp_74\\htdocs\\Drupal\\slac-it\\web\\core\\modules\\page_cache\\src\\StackMiddleware\\PageCache.php(85): Drupal\\page_cache\\StackMiddleware\\PageCache->pass(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)\n#21 E:\\work\\xampp_74\\htdocs\\Drupal\\slac-it\\web\\core\\lib\\Drupal\\Core\\StackMiddleware\\ReverseProxyMiddleware.php(48): Drupal\\page_cache\\StackMiddleware\\PageCache->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)\n#22 E:\\work\\xampp_74\\htdocs\\Drupal\\slac-it\\web\\core\\lib\\Drupal\\Core\\StackMiddleware\\NegotiationMiddleware.php(51): Drupal\\Core\\StackMiddleware\\ReverseProxyMiddleware->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)\n#23 E:\\work\\xampp_74\\htdocs\\Drupal\\slac-it\\vendor\\stack\\builder\\src\\Stack\\StackedHttpKernel.php(23): Drupal\\Core\\StackMiddleware\\NegotiationMiddleware->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)\n#24 E:\\work\\xampp_74\\htdocs\\Drupal\\slac-it\\web\\core\\lib\\Drupal\\Core\\DrupalKernel.php(709): Stack\\StackedHttpKernel->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)\n#25 E:\\work\\xampp_74\\htdocs\\Drupal\\slac-it\\web\\index.php(19): Drupal\\Core\\DrupalKernel->handle(Object(Symfony\\Component\\HttpFoundation\\Request))\n#26 {main}
While I use new DB with same existing code, it works. I tried to check DB and both DB has same media table exist.
I am using drupal code module "media"
I have spent many days for this but didn't found anything. Any kind of help would be appreciated. Thanks!