Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Steps to reproduce:
1) Add a new address field on a content type
2) Go to admin/content
3) See the error
Notice: Undefined index: field_asasa in address_field_views_data() (line 38 of modules/address/address.views.inc).
address_field_views_data(Object)
call_user_func_array('address_field_views_data', Array)
Drupal\Core\Extension\ModuleHandler->invoke('address', 'field_views_data', Array)
views_views_data()
call_user_func_array('views_views_data', Array)
Drupal\Core\Extension\ModuleHandler->invoke('views', 'views_data')
Drupal\views\ViewsData->getData()
Drupal\views\ViewsData->get('node')
Drupal\views\Plugin\ViewsHandlerManager->getHandler(Array, NULL)
Drupal\views\Plugin\views\display\DisplayPluginBase->getHandlers('field')
Drupal\views\ViewExecutable->_initHandler('field', Array)
Drupal\views\ViewExecutable->initHandlers()
Drupal\views\Plugin\views\display\DisplayPluginBase->preExecute()
Drupal\views\ViewExecutable->preExecute(Array)
Drupal\views\ViewExecutable->executeDisplay('page_1', Array)
Drupal\views\Element\View::preRenderViewElement(Array)
call_user_func(Array, Array)
Drupal\Core\Render\Renderer->doRender(Array, )
Drupal\Core\Render\Renderer->render(Array, )
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}()
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object)
Drupal\Core\Render\MainContent\HtmlRenderer->prepare(Array, Object, Object)
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object, Object)
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object, 'kernel.view', Object)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.view', Object)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1)
Stack\StackedHttpKernel->handle(Object, 1, 1)
Drupal\Core\DrupalKernel->handle(Object)
Comments
Comment #2
bojanz CreditAttribution: bojanz at Centarro commentedaddress_field_views_data() is relying on the presence of the default views definitions for the address field. The hook might be running too early, when those definitions aren't available yet.
Comment #3
rootworkI'm seeing this as well on views pages when I go to add new fields to a view. 8.0.0-beta16.
Comment #4
rootworkComment #6
bojanz CreditAttribution: bojanz at Centarro commentedLooks like we don't actually need the lines that were causing the notice (the joy of assoc array APIs), so I've just removed them.