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.
After completing a schedule (completed column set as 1 by workbench_scheduler_node_set_complete()
), if the user update the node, a new revision is created and a new schedule is added for the node with the same dates (start and/or end) from the first revision. So when cron runs, the node is published/unpublished again. It's an inconvenient loop.
Comments
Comment #1
tregismoreira CreditAttribution: tregismoreira commentedAs my first approach, I was thinking in execute the function
workbench_scheduler_delete_node_schedule()
inside theworkbench_scheduler_node_set_complete()
(after update query). But it would erase the entire scheduling history of the node. So I decided to just add a new condition onworkbench_scheduler_load_node_schedule()
:The patch is attached and is working sweetly (for me). Let's discuss about that solution, if it doesn't make sense.
Comment #2
mikemiles86tregismoreira,
Thanks for pointing out this issue and providing a patch.
Can you update it so the paths are relative to only the module, and not your install directory? Patch does not apply otherwise.
should be:
Comment #3
tregismoreira CreditAttribution: tregismoreira commentedOh sure! Here it is ;)
Comment #4
mikemiles86Comment #6
mikemiles86Patch worked as expected and solves the problem described.
Patch has been applied to the 7.x-1.x-dev branch and will be included in the next release.
Thanks for the support!
Comment #7
mikemiles86