• Resolved piconomic

    (@piconomic)


    Hi there!
    I have a poll set up that has been working for quite a while now. I have updated to Yop Poll Pro 5.8.0 and have now noticed that the answers to each question is not displayed in the correct / desired order.

    I have inspected the MySQL database entries and the poll_id, question_id and question_order for each answer appears to be correct.

    Can anyone confirm that the question order has been broken? Will it be fixed in a new release?

    Thanks in advance,
    Pieter

    https://www.ads-software.com/plugins/yop-poll/

Viewing 3 replies - 1 through 3 (of 3 total)
  • We’re also noticing this on YOP Poll Pro.

    Re-ordered answers and saved but the order is not retained in the admin area or front end. Seems to default to alphabetic ordering.

    Thread Starter piconomic

    (@piconomic)

    I solved it myself by going back to an older version of the following file:
    /wp-content/plugins/yop-poll/models/question_model.php

    I don’t know PHP, but performed a diff, reverted to the older version and it worked for me.

    You need to modify the function “load_answers_ids” and add two lines of “$orderby = “answer”;” Here is the relevant bit:

    function load_answers_ids( $orderby = "question_order", $orderRule = "ASC",$only_15_answer='no' ) {
    			$orderby = "answer";
              if($only_15_answer=='view_only15_answer'){
                  if($orderby=="")
                        $orderby="question_order";
                  if($orderRule=="")
                         $orderRule="ASC";
                  $orderby = "answer";
    			                if ( !$answers = $GLOBALS['wpdb']->get_col(

    Regards,
    Pieter

    Plugin Author YOP

    (@yourownprogrammer)

    @piconomic, @redsundesign please contact us at yop.help{at}gmail.com regarding this issue.

    Thank you.
    YOP Team

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Poll answers not displayed in correct order’ is closed to new replies.