I created a binary poll having 4 choices/ 1 answer. As an admin, everything shows up and works fine.
Given access to authenticated users to "vote on polls" and "view polls", an authenticated user sees the node, sees the 4 radio buttons, but instead of the choices' text he only sees n/a behind the radio buttons. Hard to vote, then.

I let the node object show up, and in some array leaves the choices' text appear, in others it doesn't. In short:

Here the choices appear (shortened code):

stdClass Object
(
[choice] => Array
        (
            [1] => Array
                (
                    [label] => My first choice
                )

Here it does not:

stdClass Object
(
[content] => Array
        (
            [poll] => Array
                (
                    [#value] => <form action="/wu-x/node/380"  method="post" id="advpoll_voting_binary_form-0" class="advpoll-vote">
<div><div class="poll">
<input type="hidden" name="ajax" id="edit-ajax" value=""  class="ajax" />
<div class="form-radios"><div class="form-item">
 <label class="option"><input type="radio" name="choice" value="1"   class="form-radio" /> n/a</label>
</div>

Here it does not either:

stdClass Object
(
   [#children] => <form action="/wu-x/node/380"  method="post" id="advpoll_voting_binary_form-0" class="advpoll-vote">
<div><div class="poll">
<input type="hidden" name="ajax" id="edit-ajax" value=""  class="ajax" />
<div class="form-radios"><div class="form-item">
 <label class="option"><input type="radio" name="choice" value="1"   class="form-radio" /> n/a</label>
</div>

I put a print_r($node) into the node-advpoll_binary.tpl.php file and send you the entire output as an attached file.

Comments

ChrisKennedy’s picture

Hmmm thanks for the bug report, this appears to be a problem with _advpoll_check_markup()'s call to check_markup(), which is being called in advpoll_voting_binary_form().

Now that I look at it, in the binary version we try to do an access check on the choice titles when previewing, but in the ranking version we don't.

Anders?

anders.fajerson’s picture

Status: Active » Fixed

I guess another of those "I don't use rankings that much" mistakes. Since the preview check wasn't the format check defaults to TRUE, rendering it like N/A for users without permissions to view the filter format. Good call.

http://drupal.org/cvs?commit=83710

anders.fajerson’s picture

Version: 5.x-1.0-beta5 » 5.x-1.x-dev

Correct version.

ChrisKennedy’s picture

Status: Fixed » Active

MarcoR's having the problem with binary polls though. I would think we need to actually remove the filter check from both types.

anders.fajerson’s picture

I see. Well, at least in theory the filter check should be off (FALSE) when viewing polls (both types now). Could you reproduce this?

ChrisKennedy’s picture

I haven't reproduced it yet. I'm guessing it happens when the voter doesn't have access to the default input format for whoever created the poll. I haven't tried checking $node->in_preview yet, but maybe in_preview isn't defined and !isset($node->nid) would be better.

anders.fajerson’s picture

Status: Active » Postponed (maintainer needs more info)

That should have been adressed in a previous bugfix (pretty sure it was before beta 5 though).

MarcoR , can you downoad the latest release and see if problem is still there?

marcor’s picture

Priority: Critical » Normal
Status: Postponed (maintainer needs more info) » Fixed

Thank you very much! :) This works fine now. But the common jquery actions don't work anymore (compared to the beta5 version I used before). So with javascript enabled I cannot reveal some options when editing. But this is another issue and I can access everything with javascript turned off.

Anonymous’s picture

Status: Fixed » Closed (fixed)