- Merge request !4Issue #2909811: Anonymous users - Multiple voting from one IP → (Closed) created by megachriz
- 🇺🇸United States fozzieblue
I'm not able to update the poll module to 1.5 or 1.6.
My Drupal site is running the following:
- poll module 8.x-1.4
- Drupal 9.5.8
- I am using patch #35 from this issue.When I run `composer update drupal/poll` I get the following error:
Could not apply patch! Skipping. The error was: Cannot apply patch https://www.drupal.org/files/issues/2020-10-21/poll-unlimited-votes-2909811-35.patch [Exception] Cannot apply patch Anonymous users - Multiple voting from one IP (https://www.drupal.org/files/issues/2020-10-21/poll-unlimited-votes-2909811-35.patch)!
I removed the patch and was able to update the poll module to 8.x-1.6. But updating with out the patch in #35, the poll module no longer allows multiple votes from the same IP.
Is anyone else able to update poll to 8.x-1.6 and still use patch #35?
- 🇬🇧United Kingdom naheemsays
Can an alternative approach be to differentiate by mac address?
I dont think it is as common for different devices from the same IP address to be shared between multiple users as much as it was say 10 years ago, so if we still want to try and differentiate voters, it may be reasonable to look at distinguishing based on something other than IP address.
- Assigned to BramDriesen
- 🇧🇪Belgium BramDriesen Belgium 🇧🇪
Using this for a long time on a few projects. Would love to incorporate this on the new 2.0.x release.
Re #44: Not sure, I think the main thing used is still IP's. E.g. we still have the IP ban module, CDN's like CloudFlare offer IP bans but not Mac address bans.
- Merge request !30Issue #2909811: Anonymous users - Multiple voting from one IP → (Open) created by BramDriesen
- 🇧🇪Belgium BramDriesen Belgium 🇧🇪
Ready for review once more.
Also updating credits for everyone who actively (and meaningful) participated on this issue for the last 6 years 🙈.
- Issue was unassigned.
- ivnish Kazakhstan
Needs reroll
error: patch failed: src/Form/PollViewForm.php:247
error: src/Form/PollViewForm.php: patch does not apply
error: patch failed: src/Form/PollViewForm.php:204
error: src/Form/PollViewForm.php: patch does not apply - Status changed to Needs work
8 months ago 12:50pm 9 March 2024 - 🇧🇪Belgium BramDriesen Belgium 🇧🇪
Thanks @Berdir! This also needs a rebase now and a change in ID for the install/update hook
- First commit to issue fork.
- 🇧🇪Belgium cgoffin
I rebased the changes from the dev branch. Here also an up to date patch.
- 🇧🇪Belgium cgoffin
There was a missing newline at the end of the patch file. Here the new version.
- 🇺🇦Ukraine lobodacyril
#54 patch stopped working after last updates on dev branch.
- First commit to issue fork.
- 🇧🇪Belgium Ozmodiar
The patch in #58 does not work as it adds a 8003 updatehook while in 2.0.x updatehook 8003 already exists for something else... Simply changing the one from the patch to 8007 exposes the problem Bram mentioned above (the updatehook is not idempotent).
- 🇧🇪Belgium Ozmodiar
Reroll against 2.0.x with the idempotent update hook. This should be safe to use if you have already used an earlier version of this patch in your project.
- 🇮🇳India drupalite1411
Used patch #61, it is providing option from UI to select if per IP vote,per session vote and unlimited vote.
I select any option and save the form. When I edit the form the select field does retain it's value. Moreover, the functionality is not working.
I can't give unlimited vote. - 🇮🇳India drupalite1411
Updated. In the patch #61, removed this repetitive code from poll.php and vote per session functionality is working fine now. I am still testing
$fields['anonymous_vote_restriction'] = BaseFieldDefinition::create('list_string') ->setLabel(t('Anonymous vote restriction')) ->setSetting('allowed_values', [ 'ip' => t('One vote per IP'), 'session' => t('One vote per session'), 'unlimited' => t('Unlimited votes'), ]) ->setDefaultValue('ip') ->setRequired(TRUE) ->setDisplayOptions('form', [ 'type' => 'options_select', 'settings' => [ 'display_label' => TRUE, ], 'weight' => 2, ]) ->setDisplayConfigurable('form', TRUE);
I found it is actually removed from the merge request https://git.drupalcode.org/project/poll/-/merge_requests/30/diffs?commit...