When setting a Smart Date field to allow recurring date values (checkbox "Allow recurring date values" on field settings), the following message is displayed on its respective content type add and edit pages:

Notice: Undefined index: type in /[MY-SITE]/docroot/core/lib/Drupal/Core/Render/Element/Date.php on line 65

This is happening because the Date field defined for element repeat-end-date (visible when you choose option "On Date" of select field "Ends") doesn't have the cited attribute, which is expected when the Date element is rendered.

This is a small fix, and I'm submitting a patch on comment.

CommentFileSizeAuthor
#2 undefined_index_type-3104616-2.patch492 bytesmaursilveira

Comments

maursilveira created an issue. See original summary.

maursilveira’s picture

StatusFileSize
new492 bytes

Here is the patch for the reported issue. It simply sets the missing attribute to Date element repeat-end-date. The Notice message is not displayed anymore after applying the patch.

Please let me know if there's any question about this. Thank you.

  • mandclu committed 578f3ec on 8.x-2.x authored by maursilveira
    Issue #3104616 by maursilveira: Notice: Undefined index: type when...
mandclu’s picture

Status: Active » Fixed

Thanks for finding this, and for providing a fix. Committed to the 8.x-2.x branch.

Status: Fixed » Closed (fixed)

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