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
Comment #3
mandclu commented