vwm_polls icon indicating copy to clipboard operation
vwm_polls copied to clipboard

{user_vote} not working due to cookie prefix

Open GaryReckard opened this issue 11 years ago • 1 comments

I'm not sure if this is a configuration issue on my part or not, but the vote cookies created from this add-on are prefixed with 'exp_'. So, they look like 'exp_44-38', for instance. This causes an issue when I am trying to use the {user_vote} tag in the {options} tag pair. It's never true.

In the vwm_polls_m.php file, in the previous_votes() function. I changed the line

$id = $this->entry_id . '-' . $this->field_id;

to

$id = 'exp_'.$this->entry_id . '-' . $this->field_id;

and now the {user_vote} tag works just fine. I'm not saying that's the best solution.... I'm not sure how or when that exp_ prefix gets put on the cookie, and if that's the case on every EE install, or if I configured that somewhere...

GaryReckard avatar Aug 15 '14 04:08 GaryReckard

I made a commit to the master branch which should resolve this issue.

vmichnowicz avatar Aug 16 '14 02:08 vmichnowicz