- πΊπΈUnited States cedewey Denver, CO
Steve, your patch worked great. Thanks so much!
- π«π·France GuillaumePacilly
Hey, thanks a lot for the patch.
I have a similar issue when the user set a "publish on" date in the past from the node add form. In that case another scheduler event is triggered (Prepublish).
I have updated the patch to handle this case as well.
- last update
12 months ago 3 pass - π«π·France GuillaumePacilly
Previous patch missed service argument for the PublicationDateSubscriber
- Status changed to Needs work
8 months ago 5:27pm 30 April 2024 - πΊπΈUnited States integratrix
I tested patch #10 with Publication Date 8.x-2.0-beta7, Scheduler 2.0.2 and Drupal 10.2.2 and it gave me an error.
TypeError: Drupal\publication_date\EventSubscriber\PublicationDateSubscriber::onSchedulerPublish(): Argument #1 ($event) must be of type Drupal\scheduler\SchedulerEvent, Drupal\scheduler\Event\SchedulerEvent given in Drupal\publication_date\EventSubscriber\PublicationDateSubscriber->onSchedulerPublish() (line 50 of modules/contrib/publication_date/src/EventSubscriber/PublicationDateSubscriber.php).
Replacing
use Drupal\scheduler\SchedulerEvent
withuse Drupal\scheduler\event\SchedulerEvent
resolved error for me.