Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
For one of our clients we are using workflows and most of the time our content stays unpublished as we are only working with draft version so we needed to stop expiration for those nodes. I find this really useful so i generated a patch with configuration for this feature.
Comment | File | Size | Author |
---|---|---|---|
#4 | expire-stop-expire-execution-for-unpublished-nodes-2612592-4-d7.patch | 2.8 KB | ShaxA |
#2 | expire-stop-expire-execution-for-unpublished-nodes-2612592-2-d7.patch | 1.96 KB | ShaxA |
Comments
Comment #2
ShaxA CreditAttribution: ShaxA at FFW commentedHere is the patch itself.
Comment #3
ShaxA CreditAttribution: ShaxA at FFW commentedComment #4
ShaxA CreditAttribution: ShaxA at FFW commentedSorry i forgot to export configuration options. So here is the working patch
Comment #5
SpleshkaI'd suggest you to implement hook_expire_urls_alter() where you can remove urls from being expired when the node is in the unpublished state. I don't see a necessity to provide a workarounds in the module for each possible workflow case.