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
Comment | File | Size | Author |
---|---|---|---|
Capture.PNG | 52.82 KB | Crom |
Comments
Comment #1
mstef CreditAttribution: mstef commentedThat'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.
Comment #2
Crom CreditAttribution: Crom commentedHa, 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
Comment #3
Crom CreditAttribution: Crom commentedComment #4
ezra-g CreditAttribution: ezra-g commentedSounds like this is confusing and could use some revision for clarity.
Comment #5
mstef CreditAttribution: mstef commentedYes, 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?
Comment #6
mstef CreditAttribution: mstef commentedCore issue created and patches are in the over: #1368938: Vote count shouldn't show on add/edit without admin perms
Comment #7
mstef CreditAttribution: mstef commentedSee posts for two patches - for both possible fixes.
Comment #8
Crom CreditAttribution: Crom commentedThanks 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 ;-)
Comment #9
mstef CreditAttribution: mstef commentedMarking 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.
Comment #10
japerryThis 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.