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

  • wpsolr
    Keymaster
    # 8 months, 2 weeks ago

    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
    # 8 months, 2 weeks ago

    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
    # 8 months, 2 weeks ago

    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
    # 8 months, 2 weeks ago
    leomoon
    Participant
    # 8 months, 2 weeks ago

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

    wpsolr
    Keymaster
    # 8 months, 2 weeks ago

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

    wpsolr
    Keymaster
    # 8 months, 2 weeks ago

    Can you deactivate WPSOLR completely, and see what happens?

    leomoon
    Participant
    # 8 months, 2 weeks ago

    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
    # 8 months, 2 weeks ago

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

    wpsolr
    Keymaster
    # 8 months, 2 weeks ago

    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
    # 8 months, 2 weeks ago

    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
    # 8 months, 2 weeks ago

    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
    # 8 months, 2 weeks ago

    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
    # 8 months, 2 weeks ago

    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
    # 8 months, 2 weeks ago

    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.