• Resolved rodskagg

    (@rodskagg)


    After upgrading to 2.12.1 this plugin stopped working – it’s not sorting posts front end anymore. I turned on logging and found this: “RPWC2 SORT VALIDATION ABORTED, for orderby: menu_order”.

    I have checked the “Override ‘orderby’ query attribute” checkbox.

    The “RPWC2 SORT VALIDATION ABORTED, for orderby” error seems to be logged if the rpwc2_allow_custom_sort_orderby_override filterhook returns false. However, I have not implemented this hook. Is it possible that the absence of this hook means that is_ranked is set to false? (Line 260 in class-reorder-post-within-categories-public.php)

    It used to work fine in previous versions so something seems to have changed…

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Aurovrata Venet

    (@aurovrata)

    what posts are you trying to order?

    v2.12 changes (should) affect only WooCommerce products

    Thread Starter rodskagg

    (@rodskagg)

    Some custom post types. I’m not using WooCommerce.

    Won’t this return false if WooCommerce plugin isn’t active?

    public function override_woocommerce_products($override, $wp_query, $taxonomy, $term_id, $type){
        return is_plugin_active('woocommerce/woocommerce.php')
         && $type==='product'
         && $wp_query->query_vars['orderby']==='meta_value';
      }

    Called from lin 211 in class-reorder-post-within-categories.php:

    $this->loader->add_filter('rpwc2_allow_custom_sort_orderby_override', $plugin_public, 'override_woocommerce_products', 1, 5);

    Which causes is_ranked to be set to false at line 260 in class-reorder-post-within-categories-public.php

    • This reply was modified 2 years, 9 months ago by rodskagg.
    • This reply was modified 2 years, 9 months ago by rodskagg.
    Plugin Author Aurovrata Venet

    (@aurovrata)

    Won’t this return false if WooCommerce plugin isn’t active?

    oh silly me, yes it will!

    just fixed in v2.12.2

    let me know if that works for you now

    Thread Starter rodskagg

    (@rodskagg)

    Works as intended now! Thanks!

    Plugin Author Aurovrata Venet

    (@aurovrata)

    sooper! thanks for the report.

    when you have a moment to spare do leave a review.

    Hi Aurovrata!
    I upgraded to 2.12.3 and my products order is not working anymore ??
    I guess that this can be related to this topic.

    Thanks in advance!

    p.s

    I am not using any custom query on the theme. only standard woocommerce loop.

    • This reply was modified 2 years, 9 months ago by webziss.
    Plugin Author Aurovrata Venet

    (@aurovrata)

    @webziss

    I guess that this can be related to this topic.

    possibly, possibly not, however please start a new thread, this is WP forum policy.

    also, can you enable the following modes in your wp-config.php file,

    
    define('WP_DEBUG', true);
     define('WP_GURUS_DEBUG', true);
     if ( WP_DEBUG ) {
         define( 'WP_DEBUG_LOG', true );
         define( 'WP_DEBUG_DISPLAY', false );
         @ini_set( 'display_errors', 0 );
         define('AUTOSAVE_INTERVAL', 600 );  //seconds
     }

    `

    and report back in the new thread what the plugin prints to your wp-content/debug.log file (look for the line that says “RPWC2 SORT VALIDATION ABORTED,….”)

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Front end reordering does not work since 2.12.1’ is closed to new replies.