TypeError: Drupal\scheduler_content_moderation_integration\EventSubscriber\SchedulerEventSubscriber::publishImmediately()

Created on 22 April 2024, 8 months ago
Updated 4 July 2024, 6 months ago

Problem/Motivation

After updating to the Scheduler module v2.0.2, the follow error is thrown when saving a node that has a publish date in the past and the "content item immediately after saving" for the "action to be taken for publication dates in the past" option is set.

"TypeError: Drupal\scheduler_content_moderation_integration\EventSubscriber\SchedulerEventSubscriber::publishImmediately(): Argument #1 ($event) must be of type Drupal\scheduler\SchedulerEvent, 

Drupal\scheduler\Event\SchedulerEvent given in REDACTED/modules/contrib/scheduler_content_moderation_integration/src/EventSubscriber/SchedulerEventSubscriber.php:23

Steps to reproduce

  1. Setup a content type that allows publishing dates in the past, but has the "save content item immediately after saving" option set for "action to be taken for publication dates in the past".
  2. Create a node of the content type with a published date in the past.
  3. Error message should show.

Proposed resolution

Correct passed event type.

Remaining tasks

N/A

User interface changes

N/A

API changes

N/A

Data model changes

N/A

๐Ÿ› Bug report
Status

Closed: outdated

Version

2.0

Component

Code

Created by

๐Ÿ‡บ๐Ÿ‡ธUnited States pcate

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024