Problem/Motivation

When attempting to select a Smart Date-provided widget on a core Datetime Range field, the AJAX load is attempted but never finishes, so the widget is never actually selected. No errors are logged by watchdog, but the following is available in the Javascript console:

Error
Using $this when not in object context
Error thrown with message "Using $this when not in object context"

This error was introduced by #3335598: Drupal Coding Standards Issues | phpcs because the method was also being called statically in SmartDateDefaultWidget and all the widgets that extend it.

Proposed resolution

Move the relevant method into a new trait and then use it where needed, so it never needs to be called statically.

Comments

mandclu created an issue. See original summary.

  • mandclu committed 18d352af on 3.7.x
    Issue #3341034 by mandclu: Can't select Smart Date widgets with a core...
mandclu’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

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