Jefferson49 / Joomla_plugin_sexypolling_reloaded

Migration of the joomla plugin "Sexy Polling" to joomla 4.x
GNU General Public License v3.0
2 stars 3 forks source link

Newly added answer is counted with 0 votes if shown for the first time #43

Closed Jefferson49 closed 10 months ago

Jefferson49 commented 1 year ago

Observed with Joomla 3.10 and sexy polling v4.1.7rc

In certain situations, a newly added answer is counted with 0 votes if shown for the first time. After reloading the website, the correct number of 1 vote is shown.

This seems to happen if the vote is the first vote of the day and only happens if multiple answers are deactivated. In vote.php, the incoming max_date seems to be from an earlier date. Therefore, votes of the current date are not counted.

Jefferson49 commented 1 year ago

Debugging in vote.php and addanswer.php not successful. Root cause lies probably in JavaScript, which does not send the correct max_date to vote.php. Earlier max_date (i.e. before vote) is sended. However, current date should be sended.

Jefferson49 commented 10 months ago

Fixed with d6c588e3 and bba260be