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.
Problem
When a Session node is create it is unpublished by default. Users with the necessary permissions can then change the status of the session based on whether the session has been declined, accepted, featured, etc. Sessions which have been marked as "accepted" or "featured" don't display in any of the views unless their publish state is also updated to "published".
Proposed Solution
It would be great if Session nodes were published automatically when their status is changed to "accepted" or "featured". This could be accomplished with a rule.
Comments
Comment #1
genjohnson CreditAttribution: genjohnson commentedPatch coming.
Comment #2
genjohnson CreditAttribution: genjohnson commentedHere's a patch. A sessions which have been marked as "accepted" or "featured" should be published when the node is saved.
Comment #3
fullerja CreditAttribution: fullerja commentedWorks on both the Accepted and the Featured choices.
Comment #4
japerryJason was talking about perhaps keeping the publish rule in code so people cannot alter the feature. I'm okay with making this a rule, but I'd like some opinions on if this functionality should be alterable or not.
Comment #5
genjohnson CreditAttribution: genjohnson commentedI can't think of a use case where I would want accepted sessions to be unpublished, so I'm ok with this functionality not being alterable.
Comment #6
mrconnerton CreditAttribution: mrconnerton commentedI think we need to keep this flexible as a rule. I've done one conference for a non-profit higher ed group that wanted to be able to moderate the sessions, but nothing was actually published until a few months later. In this case they would want the ability to disable this rule.
I vote we put this back to RTBC and once it is commited we add a documentation page about it.
Comment #7
mrconnerton CreditAttribution: mrconnerton commentedrerolling rule and adding update script to revert the feature
Comment #8
mrconnerton CreditAttribution: mrconnerton commentedComment #9
mrconnerton CreditAttribution: mrconnerton commentednew line at end of .install
Comment #10
mrconnerton CreditAttribution: mrconnerton commentedComment #11
japerry