Notice: Undefined index: id in Drupal\views\Plugin\ViewsHandlerManager->getHandler() (line 104 of core/modules/views/src/Plugin/ViewsHandlerManager.php).
Drupal\views\Plugin\ViewsHandlerManager->getHandler(Array, NULL) (Line: 889)
Drupal\views\Plugin\views\display\DisplayPluginBase->getHandlers('filter') (Line: 1040)
Drupal\views\ViewExecutable->_initHandler('filter', Array) (Line: 898)
Drupal\views\ViewExecutable->initHandlers() (Line: 2268)
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: 99)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 78)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 99)
Drupal\shield\ShieldMiddleware->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: 666)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

Comments

AexChecker created an issue. See original summary.

aexchecker’s picture

Tiny fix.

aexchecker’s picture

Status: Active » Needs review
podarok’s picture

Status: Needs review » Reviewed & tested by the community

#2 looks good, can be merged

abramm’s picture

Status: Reviewed & tested by the community » Active

I'm not sure about this, it looks like those handlers data was originally there. The $data = parent::getViewsData(); should have returned an array with those entries, but they are invalid or unexpected (naming change?).

abramm’s picture

aexchecker’s picture

@abramm thank you
it looks like a real problem.

abramm’s picture

I think the solution would be walking the $data supplied by parent and checking the field metadata to find our handlers (is there some reliable way to do this?).

Or just check for both field names ;).

manojapare’s picture

@AexChecker

It would be great if you can give step to reproduce or the scenario for the same.

abramm’s picture

@manojapare

Simply install the module with Drupal 8.5. You should see errors after clearing the cache.

This is why this is happening: http://cgit.drupalcode.org/drupal/commit/core/modules/views/src/EntityVi... .

The array key was changed in core. The module should try both old and new keys.

manojapare’s picture

Status: Active » Closed (cannot reproduce)

@abramm

Not able to reproduce the issue. Did the following to reproduce the issue:

  1. Install module with Drupal 8.5.x
  2. Cleared cache
  3. Open broken links list page (/admin/config/broken_link). Initially empty.
  4. Hitted site with wrong url.
  5. One broken link listed out. Checked search as well.
  6. Add redirect rule and checked redirection is happening.

For now, I am closing the issue. Please feel free to re-open.

icurk’s picture

Status: Closed (cannot reproduce) » Needs work

I was able to reproduce the issue using the Drupal version 8.5.4. The patch helped and hides the error, but when trying to edit the view of broken links I got an error

Notice: Undefined index: title in /var/www/html/web/core/modules/views/src/Plugin/views/HandlerBase.php on line 158
abramm’s picture

That is because the patch is incorrect. I've explained what is happening and why, referenced to corresponding Drupal core change which caused this error, proposed a solution but the module maintainer closed the issue.

I didn't provide a patch since I never used this module, I'm only here because @AexChecker asked me to review the patch.

@icurk, could you please your steps to reproduce?

icurk’s picture

I just installed the module, cleared cache and visited the broken links list page (/admin/config/broken_link)

tjtj’s picture

This raised its head again in Drupal 8.7.2 after I installed Broken Link.
Undefined index: id in Drupal\views\Plugin\ViewsHandlerManager->getHandler() (line 104 of core/modules/views/src/Plugin/ViewsHandlerManager.php).

aexchecker’s picture

@tjtj thank you for the actualization.
I'll try to re-investigate and fix this in the nearest future.

nanabrownee’s picture

same issue here, any luck with a fix?

afagioli’s picture

note: having this in the local enviroment, that disappears once the setting.local.php is removed

manojapare’s picture

Status: Needs work » Needs review
StatusFileSize
new900 bytes
new1.38 KB

Fixed the undefined index id notice. Please review the patch.

harika gujjula’s picture

Status: Needs review » Reviewed & tested by the community

This occurs on hitting the configuration page of broken link.

Patch looks good and i don't see the notice after applying the patch.

  • manojapare committed a6c6c2b on 8.x-3.x
    Issue #2986545 by manojapare, AexChecker, abramm, icurk, tjtj, podarok,...
manojapare’s picture

Assigned: aexchecker » Unassigned
Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.