cookie not getting set correctly

Created on 1 December 2023, 12 months ago

Problem/Motivation

To check if a voter has already voted on the poll, one option is to use cookies. However this was not working for me at all. I discovered that the cookie that was getting saved was just the NID but it was looking for a cookie called "advpoll"+NID. So I had to add this to line 337 of includes/advpoll_voteapi.php

<?php
      if($vote['nodetype'] == '') {
          $vote['nodetype'] = 'advpoll';
      }

?>

Steps to reproduce

I guess, just try making a poll that checkes for cookies intead of the using the voter api. Then fill out and submit the poll, and return to the poll and see if its showing you the pull again or if its correctly saying "you've already submitted this poll".

Proposed resolution

line 337 of includes/advpoll_voteapi.php:

<?php
      if($vote['nodetype'] == '') {
          $vote['nodetype'] = 'advpoll';
      }

?>

Remaining tasks

?

User interface changes

none

API changes

none

Data model changes

?

πŸ› Bug report
Status

Active

Version

3.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States dan.mantyla

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024