I am currently running drupal 8.6.15 site. I tried to upgrade my site to the drupal version 8.7.1 using drush commands. But could not upgrade, instead it get terminated due to an unrecoverable error. Any solution to this?
My PHP version is 7.2.14.
In the terminal where drush commands are running, the following error is shown :
PHP Fatal error: Uncaught TypeError: Argument 3 passed to Drupal\views\EntityViewsData::mapFieldDefinition() must implement interface Drupal\Core\Field\FieldDefinitionInterface, null given, called in /opt/web/core/modules/views/src/EntityViewsData.php on line 290 and defined in /opt/web/core/modules/views/src/EntityViewsData.php:387
Stack trace:
#0 /opt/web/core/modules/views/src/EntityViewsData.php(290): Drupal\views\EntityViewsData->mapFieldDefinition('file_managed', 'type', NULL, Object(Drupal\Core\Entity\Sql\DefaultTableMapping), Array)
#1 /opt/web/core/modules/file/src/FileViewsData.php(16): Drupal\views\EntityViewsData->getViewsData()
#2 /opt/web/core/modules/views/views.views.inc(178): Drupal\file\FileViewsData->getViewsData()
#3 [internal function]: views_views_data()
#4 /opt/web/core/lib/Drupal/Core/Extension/ModuleHandler.php(392): call_user_func_array('views_views_dat...', Array)
#5 /opt/web/core/modules/views/src/ViewsData.php(243): Drupal\Core\Extension\ModuleHandler->invoke('views', 'views_data')
#6 /opt/web/cor in /opt/web/core/modules/views/src/EntityViewsData.php on line 387
Drush command terminated abnormally due to an unrecoverable error. [error]
Error: Uncaught TypeError: Argument 3 passed to
Drupal\views\EntityViewsData::mapFieldDefinition() must implement
interface Drupal\Core\Field\FieldDefinitionInterface, null given,
called in /opt/web/core/modules/views/src/EntityViewsData.php on line
290 and defined in
/opt/web/core/modules/views/src/EntityViewsData.php:387
Stack trace:
#0 /opt/web/core/modules/views/src/EntityViewsData.php(290):
Drupal\views\EntityViewsData->mapFieldDefinition('file_managed',
'type', NULL, Object(Drupal\Core\Entity\Sql\DefaultTableMapping),
Array)
#1 /opt/web/core/modules/file/src/FileViewsData.php(16):
Drupal\views\EntityViewsData->getViewsData()
#2 /opt/web/core/modules/views/views.views.inc(178):
Drupal\file\FileViewsData->getViewsData()
#3 [internal function]: views_views_data()
#4 /opt/web/core/lib/Drupal/Core/Extension/ModuleHandler.php(392):
call_user_func_array('views_views_dat...', Array)
#5 /opt/web/core/modules/views/src/ViewsData.php(243):
Drupal\Core\Extension\ModuleHandler->invoke('views', 'views_data')
#6 /opt/web/cor in
/opt/web/core/modules/views/src/EntityViewsData.php, line 387
The external command could not be executed due to an application [error]
error.
You have pending database updates. Run `drush updatedb` or visit [warning]
update.php in your browser.
Backups were restored successfully. [ok]
Got the following error notice in Recent log messages :
Notice: Undefined index: type in Drupal\views\EntityViewsData->getViewsData() (line 290 of /opt/web/core/modules/views/src/EntityViewsData.php) #0 /opt/web/core/includes/bootstrap.inc(587): _drupal_error_handler_real(8, 'Undefined index...', '/opt/web/core/m...', 290, Array) #1 /opt/web/core/modules/views/src/EntityViewsData.php(290): _drupal_error_handler(8, 'Undefined index...', '/opt/web/core/m...', 290, Array) #2 /opt/web/core/modules/file/src/FileViewsData.php(16): Drupal\views\EntityViewsData->getViewsData() #3 /opt/web/core/modules/views/views.views.inc(178): Drupal\file\FileViewsData->getViewsData() #4 [internal function]: views_views_data() #5 /opt/web/core/lib/Drupal/Core/Extension/ModuleHandler.php(392): call_user_func_array('views_views_dat...', Array) #6 /opt/web/core/modules/views/src/ViewsData.php(243): Drupal\Core\Extension\ModuleHandler->invoke('views', 'views_data') #7 /opt/web/core/modules/views/src/ViewsData.php(160): Drupal\views\ViewsData->getData() #8 /opt/web/modules/contrib/ds/src/Plugin/Derivative/DsEntityRow.php(91): Drupal\views\ViewsData->get('block_content') #9 /opt/web/core/lib/Drupal/Component/Plugin/Discovery/DerivativeDiscoveryDecorator.php(101): Drupal\ds\Plugin\Derivative\DsEntityRow->getDerivativeDefinitions(Array) #10 /opt/web/core/lib/Drupal/Component/Plugin/Discovery/DerivativeDiscoveryDecorator.php(87): Drupal\Component\Plugin\Discovery\DerivativeDiscoveryDecorator->getDerivatives(Array) #11 /opt/web/core/lib/Drupal/Core/Plugin/DefaultPluginManager.php(284): Drupal\Component\Plugin\Discovery\DerivativeDiscoveryDecorator->getDefinitions() #12 /opt/web/core/lib/Drupal/Core/Plugin/DefaultPluginManager.php(175): Drupal\Core\Plugin\DefaultPluginManager->findDefinitions() #13 /opt/web/core/lib/Drupal/Component/Plugin/Discovery/DiscoveryCachedTrait.php(22): Drupal\Core\Plugin\DefaultPluginManager->getDefinitions() #14 /opt/web/core/lib/Drupal/Core/Plugin/Factory/ContainerFactory.php(16): Drupal\Core\Plugin\DefaultPluginManager->getDefinition('search_view') #15 /opt/web/core/lib/Drupal/Component/Plugin/PluginManagerBase.php(83): Drupal\Core\Plugin\Factory\ContainerFactory->createInstance('search_view', Array) #16 /opt/web/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php(817): Drupal\Component\Plugin\PluginManagerBase->createInstance('search_view') #17 /opt/web/core/modules/views/src/Plugin/views/style/StylePluginBase.php(122): Drupal\views\Plugin\views\display\DisplayPluginBase->getPlugin('row') #18 /opt/web/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php(820): Drupal\views\Plugin\views\style\StylePluginBase->init(Object(Drupal\views\ViewExecutable), Object(Drupal\views\Plugin\views\display\Page), Array) #19 /opt/web/core/modules/views/src/ViewExecutable.php(882): Drupal\views\Plugin\views\display\DisplayPluginBase->getPlugin('style') #20 /opt/web/core/modules/views/src/ViewExecutable.php(1842): Drupal\views\ViewExecutable->initStyle() #21 /opt/web/core/modules/views/src/Plugin/views/display/PathPluginBase.php(132): Drupal\views\ViewExecutable->getTitle() #22 /opt/web/core/modules/views/src/Plugin/views/display/Page.php(91): Drupal\views\Plugin\views\display\PathPluginBase->getRoute('dashboard', 'page_1') #23 /opt/web/core/modules/views/src/Plugin/views/display/PathPluginBase.php(220): Drupal\views\Plugin\views\display\Page->getRoute('dashboard', 'page_1') #24 /opt/web/core/modules/views/src/EventSubscriber/RouteSubscriber.php(120): Drupal\views\Plugin\views\display\PathPluginBase->collectRoutes(Object(Symfony\Component\Routing\RouteCollection)) #25 [internal function]: Drupal\views\EventSubscriber\RouteSubscriber->routes() #26 /opt/web/core/lib/Drupal/Core/Routing/RouteBuilder.php(146): call_user_func(Array) #27 /opt/web/core/lib/Drupal/Core/ProxyClass/Routing/RouteBuilder.php(83): Drupal\Core\Routing\RouteBuilder->rebuild() #28 /opt/web/core/includes/common.inc(1170): Drupal\Core\ProxyClass\Routing\RouteBuilder->rebuild() #29 /opt/web/core/includes/utility.inc(52): drupal_flush_all_caches() #30 phar:///usr/bin/drush/commands/core/cache.drush.inc(302): drupal_rebuild(Object(Composer\Autoload\ClassLoader), Object(Symfony\Component\HttpFoundation\Request)) #31 phar:///usr/bin/drush/includes/command.inc(422): drush_cache_rebuild() #32 phar:///usr/bin/drush/includes/command.inc(231): _drush_invoke_hooks(Array, Array) #33 phar:///usr/bin/drush/includes/command.inc(199): drush_command() #34 phar:///usr/bin/drush/lib/Drush/Boot/BaseBoot.php(67): drush_dispatch(Array) #35 phar:///usr/bin/drush/includes/preflight.inc(66): Drush\Boot\BaseBoot->bootstrap_and_dispatch() #36 phar:///usr/bin/drush/includes/startup.inc(465): drush_main() #37 phar:///usr/bin/drush/includes/startup.inc(369): drush_run_main(false, '/', 'Phar detected. ...') #38 phar:///usr/bin/drush/drush(114): drush_startup(Array) #39 /usr/bin/drush(10): require('phar:///usr/bin...') #40 {main}.