Wierd one this...I've had a test site using DC1.7 running for a while with a growing number of users. They can all use the polls fine regardless of what role they are assigned.

I'm finally getting around to re-structuring the node edit/add pages on a dev version of the site and noticed that suddenly whilst uid 1 can see and use the poll's vote count fields, the field does not get rendered for standard users. Having tied myself in knots trying to work out why I thought I'd check commons.aquia.com and the same thing is happening there (see attached screenshot).

To replicate, just log in to commons.aquia.com as a standard user and create a poll and I'm guessing that you will see the same as the attached unless something very spooky is going on.

After some quick digging in hook_form_alter #access is set to false for these fields. I can manually assign these to true in which case things work as expected (except when you create a new answer choice).

Anyone got any ideas why this is happening now but has been working fine for ages?

Cheers,
Crom

CommentFileSizeAuthor
Capture.PNG52.82 KBCrom
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mstef’s picture

That's not there to view the vote count. That's there to alter the view count, and I believe, only admins can do that. It's my opinion, the column for that shouldn't be displayed if that is the case, or it should show the count, instead of the textfield that shows for admins. Also, you're showing a page for adding a new poll, so there definitely won't be a count. Try editing a poll as a normal auth user, and see if it just shows the count.

Crom’s picture

Ha, thanks Mike. How long have I been playing with this and not understood what this is for...DOH! I guess it would be more helpful to standard users to have '0 votes' displayed here but that's nothing to do with DC.

Thanks for your help,
Crom

Crom’s picture

Status: Active » Closed (works as designed)
ezra-g’s picture

Title: Polls: Authorized users don't have permissions to view vote count field » Clarify or hide "vote count" field on polls.
Status: Closed (works as designed) » Active

Sounds like this is confusing and could use some revision for clarity.

mstef’s picture

Yes, if anything, this is a core issue.

I'm looking into what shows if you edit a poll with votes as an auth users.

EDIT: Looks like the 'Vote count' column still shows without any information if you're a non-admin. What do we prefer - show the count, or just hide the column? Also, has anyone searched for an existing core issue for this?

mstef’s picture

Core issue created and patches are in the over: #1368938: Vote count shouldn't show on add/edit without admin perms

mstef’s picture

See posts for two patches - for both possible fixes.

Crom’s picture

Thanks mike and Ezra-g. I agree that it could be less confusing. I'll put my vote on not showing the entire column as to me it just won't make sense to a standard user...or sometimes to the admin - but we won't dwell on that ;-)

mstef’s picture

Status: Active » Needs review

Marking this as needs review, because we could use a core patch, if we wanted to. See #1368938: Vote count shouldn't show on add/edit without admin perms.

japerry’s picture

Version: » 6.x-1.x-dev
Issue summary: View changes
Status: Needs review » Closed (won't fix)

This is old legacy Drupal 6.x-1.x-dev code and won't be supported. It is most likely not relevant and/or fixed in newer versions. Marking won't fix.