Problem/Motivation

The Single DateTimePicker Range (single_datetime_range) module depends on the parent module Single DateTimePicker (single_datetime) but that dependency isn't actually configured in the single_datetime_range.info.yml
Therefore it's possible to enable the Single DateTimePicker Range module without enabling the Single DateTimePicker module.
Doing this and trying to access any page will result in the following error:
Error: Class "Drupal\single_datetime\Plugin\Field\FieldWidget\SingleDateTimeBase" not found in include() (line 23 of modules/contrib/single_datetime/modules/single_datetime_range/src/Plugin/Field/FieldWidget/SingleDateTimeRangeWidget.php).

Steps to reproduce

Enable the single_datetime_range module without enabling the single_datetime module.

Proposed resolution

Add the single_datetime module as a dependency of single_datetime_range.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

GRcwolf created an issue. See original summary.

grcwolf’s picture

Status: Active » Needs review
StatusFileSize
new813 bytes

I created a simple MR to fix this.
I would appreciate some feedback on it.

kanchan bhogade’s picture

StatusFileSize
new67.15 KB
new69.79 KB

I've tried to reproduce the issue; unable to see an error message on a page but while module Single DateTimePicker Range installation the Single DateTimePicker module is missing.
MR is applied cleanly...

Test Result:
The Single DateTimePicker Range module depends on the parent module Single DateTimePicker.

Added SS for reference

Keeping in "needs review" for more review and code verification