Come together with the global Drupal community in Rotterdam, 28 Sept – 1 Oct 2026. Sessions, contribution, connection, and Early Bird savings until 8 June.
"Unknown decision mode : ." messege when previewing
» "Unknown decision mode : ." message when previewing
It seems that Line 487 of decisions.module is the problem (" $mode = $node->mode") but I haven't yet figured out what the appropriate variable is that would also work with previews.
You mean in function decisions_view_results, right? I actually think it's wrong that it's that and not decisions_view_voting that is rendered during preview (poll.module also has this behaviour, not shure if it's by design or not, but I would call it a bug). $node->in_preview might be handy here.
Couldn't you take the $mode from the mode form field? Which also reminds me of this issue - if we take that route and split different modes into content types, this might not be a problem.
Comments
Comment #1
ChrisKennedy commentedIt seems that Line 487 of decisions.module is the problem (" $mode = $node->mode") but I haven't yet figured out what the appropriate variable is that would also work with previews.
Comment #2
anders.fajerson commentedYou mean in function decisions_view_results, right? I actually think it's wrong that it's that and not decisions_view_voting that is rendered during preview (poll.module also has this behaviour, not shure if it's by design or not, but I would call it a bug).
$node->in_previewmight be handy here.Couldn't you take the $mode from the mode form field? Which also reminds me of this issue - if we take that route and split different modes into content types, this might not be a problem.
Comment #3
ChrisKennedy commentedFixed - thanks for the $node->in_preview tip, I didn't know that variable existed.
Comment #4
(not verified) commented