On enabling Calendar module, getting this error:
Notice: Undefined index: id in calendar_views_data_alter() (line 16 of modules/calendar/calendar.views.inc).

Later on creating Calendar View from template, getting this error:
Notice: Undefined index: id in Drupal\views\Plugin\ViewsHandlerManager->getHandler() (line 104 of core/modules/views/src/Plugin/ViewsHandlerManager.php).


Edit: This issue is now closed as duplicate of the newer issue #2969675: Notice: Undefined index: id in calendar/calendar.views.inc on line 16
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

andyasas created an issue. See original summary.

andyasas’s picture

andyasas’s picture

Priority: Normal » Major
meramo’s picture

Same here. Drupal 8.2.1 and the latest dev.
After creating a calendar from template (using the "Content authored on" template getting lots of errors, like

Notice: Undefined index: id in Drupal\views\Plugin\ViewsHandlerManager->getHandler() (line 104 of core/modules/views/src/Plugin/ViewsHandlerManager.php).
Notice: Undefined variable: rows in Drupal\calendar\Plugin\views\row\Calendar->render() (line 528 of modules/contrib/calendar/src/Plugin/views/row/Calendar.php).
Warning: Invalid argument supplied for foreach() in Drupal\calendar\Plugin\views\style\Calendar->render() (line 544 of modules/contrib/calendar/src/Plugin/views/style/Calendar.php).
meramo’s picture

nasinandes’s picture

Hello,

I have the same problem. After enabling Calendar module I'm getting a lots of errors, like:
Notice: Undefined index: id in calendar_views_data_alter() (line 16 of modules/calendar/calendar.views.inc).

And Not yet created any calendar view.

Thanks!

georgedamonkey’s picture

Same problem here. The calendar itself seems to work and display ok, just has those errors above it.

kittysunshine’s picture

For what it's worth, we had a similar problem with our Calendar and it ended up being a conflict with the Scheduler module. This Scheduler patch resolved our problem: https://www.drupal.org/node/2849490

RaSpirit’s picture

Proposed patch

Isaw’s picture

We had the same error and we were apply the patch.
The error has been solved.
Thanks!

Isaw’s picture

Status: Active » Reviewed & tested by the community
georgedamonkey’s picture

Status: Reviewed & tested by the community » Active

I applied the patch, as well as updated scheduler and the errors persist.

benelori’s picture

I can't reproduce the issue with the latest dev and Drupal 8.3.0.

othermachines’s picture

Unable to reproduce this issue with fresh 8.3.2 installation and calendar 8.x-1.x-dev (downloaded today).

Not surprising since this seems to arise when other modules neglect to set 'id'. I don't see the harm in applying this patch but maybe better to first explore whether there might be a better way to flag that the property is missing.

Isaw’s picture

Issue tags: +I get this error again in Drupal core 8.3.4

I get this error again in Drupal core 8.3.4

oriol_e9g’s picture

Issue tags: -I get this error again in Drupal core 8.3.4
snlnz’s picture

Error is present with Drupal core 8.3.5 and calendar 8.x-1.x-dev

Update:
The suggested patch does not resolve the issue and log events occur randomly.

jonathan1055’s picture

oriol_e9g’s picture

Same issue and fix related here: #2845257: Undefined index: id in calendar_views_data_alter() I'm still having the same error.

Christopher Riley’s picture

Patch does not apply via composer nor does it patch with patch -p1 < calendar-2764741-9-properties-check-fix.patch however if you do a patch < calendar-2764741-9-properties-check-fix.patch it will patch. Would be nice to get this resolved and committed.

TommyChris’s picture

FileSize
643 bytes

Attached a re-rolled patch.

stefan.korn’s picture

Status: Active » Closed (duplicate)
Related issues: +#2969675: Notice: Undefined index: id in calendar/calendar.views.inc on line 16
jonathan1055’s picture

Issue summary: View changes

Yes the fix in #9 and #21 above is identical to #2969675-4: Notice: Undefined index: id in calendar/calendar.views.inc on line 16 commit on 3rd July

Not sure why this original issue (from July 2016) went so long without any commit, but then the new one created in May 2018 gets fixed within 2 monrhs with identical patch. But good that is it done.