A message reading "Unknown decision mode : ." is displayed when previewing a decision.

Comments

ChrisKennedy’s picture

Title: "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.

anders.fajerson’s picture

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.

ChrisKennedy’s picture

Component: User interface » Code
Status: Active » Fixed

Fixed - thanks for the $node->in_preview tip, I didn't know that variable existed.

Anonymous’s picture

Status: Fixed » Closed (fixed)