• Resolved mpgps

    (@mpgps)


    WP Courseware Progress Widget Error (see error below) occurs in Avada Theme when theme option “Enable Posts Type Order plugin” is selected.
    Is there a fix?

    WordPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘LIMIT 0, 1’ at line 1]
    SELECT wp_posts.ID FROM wp_posts WHERE 1=1 AND wp_posts.ID IN (12097) AND wp_posts.post_type = ‘course_unit’ AND (wp_posts.post_status = ‘publish’) ORDER BY wp_posts.menu_order, LIMIT 0, 1

    https://ww.wp.xz.cn/plugins/post-types-order/

Viewing 1 replies (of 1 total)
  • Plugin Author Maya

    (@tdgu)

    Possible you use an older WordPress version?
    On post-types-order.php line 102 replace this code

    if ($options['autosort'] == "1")
         $orderBy = "{$wpdb->posts}.menu_order, " . $orderBy;

    with

    if ($options['autosort'] == "1")
       {
          if(trim($orderBy) == '')
            $orderBy = "{$wpdb->posts}.menu_order ";
            else
            $orderBy = "{$wpdb->posts}.menu_order, " . $orderBy;
    
         }

    Possible this will make a fix for you, however the Widget query should set an order.

Viewing 1 replies (of 1 total)

The topic ‘WP Courseware Progress Widget SQL Error’ is closed to new replies.