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.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | undefined_index_type-3104616-2.patch | 492 bytes | maursilveira |
Comments
Comment #2
maursilveira commentedHere 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.
Comment #4
mandclu commentedThanks for finding this, and for providing a fix. Committed to the 8.x-2.x branch.