-3

When update Drupal 8.6 to 8.7 getting the following error. Anyone help would be appreciated.

TypeError: Argument 3 passed to Drupal\views\EntityViewsData::mapFieldDefinition() must implement interface Drupal\Core\Field\FieldDefinitionInterface, null given, called in /Users/punya/htdocs/un-nip/core/modules/views/src/EntityViewsData.php on line 290 in Drupal\views\EntityViewsData->mapFieldDefinition() (line 387 of core/modules/views/src/EntityViewsData.php).


Drupal\views\EntityViewsData->mapFieldDefinition('file_managed', 'type', NULL, Object, Array) (Line: 290)
Drupal\views\EntityViewsData->getViewsData() (Line: 16)
Drupal\file\FileViewsData->getViewsData() (Line: 178)
views_views_data()
call_user_func_array('views_views_data', Array) (Line: 392)
Drupal\Core\Extension\ModuleHandler->invoke('views', 'views_data') (Line: 243)
Drupal\views\ViewsData->getData() (Line: 160)
Drupal\views\ViewsData->get('node_field_data') (Line: 85)
Drupal\views\Plugin\ViewsHandlerManager->getHandler(Array, NULL) (Line: 889)
Drupal\views\Plugin\views\display\DisplayPluginBase->getHandlers('sort') (Line: 1040)
Drupal\views\ViewExecutable->_initHandler('sort', Array) (Line: 898)
Drupal\views\ViewExecutable->initHandlers() (Line: 2267)
Drupal\views\Plugin\views\display\DisplayPluginBase->preExecute() (Line: 1692)
Drupal\views\ViewExecutable->preExecute(Array) (Line: 1627)
Drupal\views\ViewExecutable->executeDisplay('page_1', Array) (Line: 77)
Drupal\views\Element\View::preRenderViewElement(Array)
call_user_func(Array, Array) (Line: 378)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 195)
Drupal\Core\Render\Renderer->render(Array, ) (Line: 226)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 582)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 227)
Drupal\Core\Render\MainContent\HtmlRenderer->prepare(Array, Object, Object) (Line: 117)
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object, Object) (Line: 90)
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object, 'kernel.view', Object)
call_user_func(Array, Object, 'kernel.view', Object) (Line: 111)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.view', Object) (Line: 156)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 68)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 52)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 693)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
1

I just worked through a similar issue. Yours may not be exactly the same, but I had to do two things. (1) Remove all old code associated with 8.6 and older versions. Basically, instead of copying 8.7 on top of 8.6, I deleted everything except my sites directory from 8.6, and copied the 8.7 files and folders fresh. (2) In sites/all/modules, I was using profile. Apparently, this module is not compatible with 8.7, at least the version I am using. Removing this folder completely allowed my site to upgrade with no further issues. There may be other contributed modules that also have issues with 8.7.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.