After updating to version 1.6 I got an error:

Notice: Undefined index: #datetimepicker-theme in Drupal\single_datetime\Element\SingleDateTime::processSingleDateTime() (line 86 of modules/contrib/single_datetime/src/Element/SingleDateTime.php).

Also the dark theme was not working.

There is a typo at line 86. Below I will post a patch for it.

Comments

joco_sp created an issue. See original summary.

joco_sp’s picture

Status: Active » Needs review
StatusFileSize
new584 bytes

Here is the patch

vandna b’s picture

#2 after applying your patch i can not generate this issue please clarify that

joco_sp’s picture

The patch solve the issue, not create it.

stephaneq’s picture

Status: Needs review » Reviewed & tested by the community

Hi,

I had this issue when using Default theme also. And I confirm this patch fix it. Thanks!

tom m fallon’s picture

Hey I applied patch #2 and then got a fairly strange error.

Notice: Undefined index: #datetimepicker_theme in Drupal\single_datetime\Element\SingleDateTime::processSingleDateTime() (line 86 of modules/contrib/single_datetime/src/Element/SingleDateTime.php).

I tracked this down to a typo in "formElement()" and have provided a patch to hopefully resolve this.

I tested in both default + dark theme and no longer get errors.

Hope helps!

Tom

tom m fallon’s picture

Status: Reviewed & tested by the community » Needs review
junkuncz’s picture

#2 is fine for me as well.

idebr’s picture

Status: Needs review » Reviewed & tested by the community

The solution in #2 is incomplete and still results in a notice on entity forms. The solution in #6 fixes the notice completely.

  • valic committed c0914ce on 8.x-1.x authored by Tom M Fallon
    Issue #2971481 by joco_sp, Tom M Fallon: The dark theme is not working
    
valic’s picture

Committed to dev.

valic’s picture

Issue tags: +8.x-1.6 release target
valic’s picture

Issue tags: -8.x-1.6 release target +8.x-1.7 release target
valic’s picture

Assigned: joco_sp » Unassigned
Status: Reviewed & tested by the community » Fixed
valic’s picture

Status: Fixed » Closed (fixed)

Released in 1.7