Closed (fixed)
Project:
Redirect Widget
Version:
1.0.0-beta1
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
20 Feb 2026 at 20:41 UTC
Updated:
3 Mar 2026 at 22:25 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
mauro_ commentedThank you for reporting, will provide a fix next friday.
Comment #3
velmir_taky commentedThe
redirect_widget.managerservice has a hard dependency on@content_moderation.moderation_information, butcontent_moderationis not a required dependency of this module. Whencontent_moderationis not installed, Drupal throws aSymfony\Component\DependencyInjection\Exception\ServiceNotFoundExceptionduring container compilation, which prevents the module from being enabled at all.Fix (2 files):
-
redirect_widget.services.yml: Changed@content_moderation.moderation_informationto@?content_moderation.moderation_informationto mark it as an optional service.-
src/RedirectWidgetManager.php: Made the constructor parameter nullable (?ModerationInformationInterface) and added a null guard (|| !$this->moderationInformation) inisModerationStatePublished()so it gracefully returnsTRUEwhen the service is not available.Tested with and without
content_moderationenabled — module installs and functions correctly in both scenarios.Comment #7
mauro_ commentedComment #9
mauro_ commented