is_page() error in class-wpsolr-plugin-woocommerce.php resulting in null-object

  • wpsolr
    Keymaster
    5 years ago #10861

    I detected a similar problem when the home page is defined as the static shop page with the Customizer. It’s fixed in the download link below. Let me know if it works for you.

    https://www.dropbox.com/s/sjhu1cl9t3518xp/wpsolr-pro-fix-home-shop.zip?dl=0

    leomoon
    Participant
    5 years ago #10864

    That did fix the errors that show up as you land on the homepage, BUT, now try to add something to the cart (in Naški language that is Dodaj u košaricu)

    http://www.antikvarijatknjiga.hr

    wpsolr
    Keymaster
    5 years ago #10865

    All my automated tests are targeting the search area.

    I’m adding more tests to browse the main pages of WooCommerce, including the checkout pages.

    wpsolr
    Keymaster
    5 years ago #10866
    leomoon
    Participant
    5 years ago #10867

    This new fix still did not make a difference when it comes to adding to cart. Massive stack trace of errors.

    wpsolr
    Keymaster
    5 years ago #10868

    Strangely, WPSOLR is not mentioned anywhere in the error call stack.

    wpsolr
    Keymaster
    5 years ago #10869

    Can you deactivate WPSOLR completely, and see what happens?

    leomoon
    Participant
    5 years ago #10870

    Errors gone with deactivation of WP-Solr. Check out the site.

    Would you like me to create you an account on the site?

    wpsolr
    Keymaster
    5 years ago #10871

    An account wouldn’t help. I’m going to test locally with your plugin and theme activated.

    wpsolr
    Keymaster
    5 years ago #10872

    Tested ok locally with your plugin and theme.

    Can you deactivate, remove, and install https://www.dropbox.com/s/cuev4zgncf5ftmw/wpsolr-pro-fix-home-shop-1.zip?dl=0 again?

    leomoon
    Participant
    5 years ago #10873

    Did that, but it did not help.

    I’ve traced it to line 3194 of class-wp-query.php where $page_obj = $this->get_queried_object(); results in null when WPSOLR is active, and returns a valid object if it is deactivated.

    leomoon
    Participant
    5 years ago #10874

    Further, get_queried_object() function, in the first line:

    if ( isset( $this->queried_object ) ) {
    return $this->queried_object;
    }
    … returns a valid object if WPSOLR is deactivated. If WPSOLR is active, it goes further into a function and still returns null ultimately. I guess $this->queried_object should have a valid value.

    leomoon
    Participant
    5 years ago #10875

    I forgot an important detail: the page that is being queried and which returns null is the shopping cart page (in my case, ID 243)

    wpsolr
    Keymaster
    5 years ago #10876

    Yes, the previous link was a fix when WPSOLR was active and the home page statically set as the Shop page.

    I cannot reproduce your last errors locally with the last fix.

    wpsolr
    Keymaster
    5 years ago #10877

    Trying to follow your stack trace error.

    While debugging, I cannot go after
    ActivePayments->woocommerce_cart_calculate_fees( ) .../class-wp-hook.php:286

    Any idea how to continue like your site on
    WooCommerce->payment_gateways( ) .../activepayments.php:104

Viewing 15 posts - 16 through 30 (of 53 total)

You must be logged in to reply to this topic.