Polls – give a random order of answers.
Quote from Sea34 on January 30, 2021, 7:49 amHello.
Polls – give a random order of answers.
When you create a survey. And you write answers in a row:
1
2
3
4
5
6
(I created 6 answers, maybe the quantity somehow affects.)Then, when you save the topic, the survey answers are sometimes given randomly:
5
1
2
3
4
6Or backward – forward (which is also bad):
6
5
4
3
2
1How to put things in order? I need the answers to be shown in the order in which I entered them. š
Hello.
Polls – give a random order of answers.
When you create a survey. And you write answers in a row:
1
2
3
4
5
6
(I created 6 answers, maybe the quantity somehow affects.)
Then, when you save the topic, the survey answers are sometimes given randomly:
5
1
2
3
4
6
Or backward – forward (which is also bad):
6
5
4
3
2
1
How to put things in order? I need the answers to be shown in the order in which I entered them. š
Quote from qualmy91 on February 2, 2021, 4:58 amHey @sea34,
it seems like there is an error. Can you please write a debug log and share the errors here. You can activate it by following this guide:
https://help.dreamhost.com/hc/en-us/articles/360029327771-Enabling-the-WordPress-Debug-log
Hey @sea34,
it seems like there is an error. Can you please write a debug log and share the errors here. You can activate it by following this guide:
https://help.dreamhost.com/hc/en-us/articles/360029327771-Enabling-the-WordPress-Debug-log
Quote from Sea34 on February 7, 2021, 6:14 amIs this error just for me, or for the plugin as a whole??
I will not be able to provide you with any data. This is all too complicated and incomprehensible for me .. (
We’ll have to torment ourselves with such polls. I will swap them after publication.
Is this error just for me, or for the plugin as a whole??
I will not be able to provide you with any data. This is all too complicated and incomprehensible for me .. (
We’ll have to torment ourselves with such polls. I will swap them after publication.
Quote from qualmy91 on February 7, 2021, 9:01 amHey @sea34,
usually, the answers of the polls stay at the same position. The order is not changing after saving them. So I guess there is a problem on your website. But I can only help you if I can get further information.
Hey @sea34,
usually, the answers of the polls stay at the same position. The order is not changing after saving them. So I guess there is a problem on your website. But I can only help you if I can get further information.
Quote from Asgaros on February 17, 2021, 9:47 amHello @sea34
Can you check if the following modification fix the issue?
OpenĀ /wp-content/plugins/asgaros-forum/includes/forum-polls.php. Replace lineĀ 491 with the following:
$poll->options = $this->asgarosforum->db->get_results("SELECT po.id, po.title, (SELECT COUNT(*) FROM {$this->asgarosforum->tables->polls_votes} AS pv WHERE pv.option_id = po.id) AS votes FROM {$this->asgarosforum->tables->polls_options} AS po WHERE po.poll_id = {$poll->id} ORDER BY po.id ASC;", 'OBJECT_K');Let me know, if the issue is solved afterwards so I can include this fix in the upcoming update.
Hello @sea34
Can you check if the following modification fix the issue?
OpenĀ /wp-content/plugins/asgaros-forum/includes/forum-polls.php. Replace lineĀ 491 with the following:
$poll->options = $this->asgarosforum->db->get_results("SELECT po.id, po.title, (SELECT COUNT(*) FROM {$this->asgarosforum->tables->polls_votes} AS pv WHERE pv.option_id = po.id) AS votes FROM {$this->asgarosforum->tables->polls_options} AS po WHERE po.poll_id = {$poll->id} ORDER BY po.id ASC;", 'OBJECT_K');
Let me know, if the issue is solved afterwards so I can include this fix in the upcoming update.
Quote from Sea34 on February 18, 2021, 8:55 pmQuote from Asgaros on February 17, 2021, 9:47 amHello @sea34
Can you check if the following modification fix the issue?
OpenĀ /wp-content/plugins/asgaros-forum/includes/forum-polls.php. Replace lineĀ 491 with the following:
$poll->options = $this->asgarosforum->db->get_results("SELECT po.id, po.title, (SELECT COUNT(*) FROM {$this->asgarosforum->tables->polls_votes} AS pv WHERE pv.option_id = po.id) AS votes FROM {$this->asgarosforum->tables->polls_options} AS po WHERE po.poll_id = {$poll->id} ORDER BY po.id ASC;", 'OBJECT_K');Let me know, if the issue is solved afterwards so I can include this fix in the upcoming update.
Yes, with the new code everything works as it should +++
Quote from Asgaros on February 17, 2021, 9:47 amHello @sea34
Can you check if the following modification fix the issue?
OpenĀ /wp-content/plugins/asgaros-forum/includes/forum-polls.php. Replace lineĀ 491 with the following:
$poll->options = $this->asgarosforum->db->get_results("SELECT po.id, po.title, (SELECT COUNT(*) FROM {$this->asgarosforum->tables->polls_votes} AS pv WHERE pv.option_id = po.id) AS votes FROM {$this->asgarosforum->tables->polls_options} AS po WHERE po.poll_id = {$poll->id} ORDER BY po.id ASC;", 'OBJECT_K');Let me know, if the issue is solved afterwards so I can include this fix in the upcoming update.
Yes, with the new code everything works as it should +++
Quote from Asgaros on February 19, 2021, 2:53 amThanks for the feedback @sea34
I will include the fix in the upcoming update!
Thanks for the feedback @sea34
I will include the fix in the upcoming update!