Not unpublishing nodes on Drupal 9

Created on 22 December 2021, over 2 years ago
Updated 1 February 2024, 5 months ago

Problem/Motivation

The expiry finds nodes to expire, but because of Drupal 9, $node->setPublished(false); is no longer valid, and the node doesn't get unpublished.

Steps to reproduce

  • Create a node that should be expired
  • run cron
  • Expiry email is sent
  • Node is still published

Proposed resolution

use $node->setUnpublished();

Remaining tasks

Code it.

User interface changes

None.

API changes

None.

Data model changes

None.

πŸ› Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡¨πŸ‡¦Canada sagesolutions

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024