• Resolved toodles53562

    (@toodles53562)


    I am getting an error log on one of my products on my site https://stoughtonwrestling.com/product/golf-outing
    It is is related to the?/product/golf-outing/I am able to reproduce the error when visiting this page but my client is

    From the error log I can see the following:

    2024/08/01 15:10:51 [error] 85822#85822: *15481 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught Error: Call to a member function is_purchasable() on string in /www/stoughtonwrestling_139/public/wp-content/themes/flatsome/inc/woocommerce/structure-wc-product-page.php:255Stack trace:#0 /www/stoughtonwrestling_139/public/wp-includes/class-wp-hook.php(324): flatsome_sticky_add_to_cart_template('')#1 /www/stoughtonwrestling_139/public/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array)#2 /www/stoughtonwrestling_139/public/wp-includes/plugin.php(517): WP_Hook->do_action(Array)#3 /www/stoughtonwrestling_139/public/wp-includes/general-template.php(3081): do_action('wp_footer')#4 /www/stoughtonwrestling_139/public/wp-includes/template-canvas.php(25): wp_footer()#5 /www/stoughtonwrestling_139/public/wp-content/plugins/woocommerce/src/Internal/ComingSoon/ComingSoonRequestHandler.php(69): include('/www/stoughtonw...')#6 /www/stoughtonwrestling_139/public/wp-includes/class-wp-hook.php(324): Automattic\WooCommerce\Internal\ComingSoon\Comi" while reading response header from upstream, client: 216.56.92.44, server: stoughtonwrestling[.]com, request: "GET /product/golf-outing/ HTTP/2.0", upstream: "fastcgi://unix:/var/run/php8.1-fpm-stoughtonwrestling.sock:", host: "stoughtonwrestling[.]com:53034", referrer: "https[:]//stoughtonwrestling[.]com/golf-registration/"

    This error indicates that there is an attempt to call the is_purchasable() method on a string, which is not a valid operation. This suggests that the variable being used is expected to be a product object but is instead a string.

    The error occurs in the flatsome_sticky_add_to_cart_template() function within the file structure-wc-product-page.php at line 255.

    They recommend to check the details with the plugin author in the file?structure-wc-product-page.php?and confirm is properly configured

    This is what I am getting from our hosting tech.
    Can you please tell me how to fix this?

    Thank you!
    Carla Scholz

Viewing 15 replies - 1 through 15 (of 16 total)
  • Stef

    (@serafinnyc)

    Hello @toodles53562 who’s they?

    This is an issue with your Flatsome theme. Please make sure you are using the latest theme and seek support from theme as we do not support 3rd party themes in this forum.

    Thread Starter toodles53562

    (@toodles53562)

    “they” is my hosting support.

    I will reach out to the Flatsome developer.

    Stef

    (@serafinnyc)

    Hello again @toodles53562 thank you for that clarification. This is not related to Woo, the Flatsome theme has a bug in its new release which is conflicting with Woo.

    Thread Starter toodles53562

    (@toodles53562)

    Sorry, I thought it was Woo.
    Have you heard that Flatsome has a bug in it that conflicts with Woo?

    Stef

    (@serafinnyc)

    Well, I should say this, since looking at the error again. It might be a server issue too if you’re not using 8.2 PHP version. I should have stated that first. Check that if you are set to 8.2 then yes there’s a bug in Flatsome. On your pasting above it’s noted

    /wp-content/themes/flatsome/inc/woocommerce/structure-wc-product-page.php

    Which is an overriding file for WooCommerce. Since that’s showing then it becomes their issue since they’re overriding the default template. As we do not support Premium themes in this forum.

    Thread Starter toodles53562

    (@toodles53562)

    Actually it is set to 8.1, not 8.2

    Stef

    (@serafinnyc)

    @toodles53562 Good. 8.1 is deprecated now, so try 8.2 and see if that helps. If not reach out to Flatsome.

    Thread Starter toodles53562

    (@toodles53562)

    THank you so much for taking the time to help me with this issue! I really appreciate it!
    This is exactly why I love Woocommerce so much!
    Thanks again!

    Stef

    (@serafinnyc)

    @toodles53562 We aim to please ?? Did that take care of the issue then?

    Thread Starter toodles53562

    (@toodles53562)

    No it didn’t. I uploaded two previous version of flatsome, it still didn’t work.
    Then, I changed the theme to a basic store theme and it didn’t work there either.

    Stef

    (@serafinnyc)

    And each time you cleared cache after doing this @toodles53562 ??

    Thread Starter toodles53562

    (@toodles53562)

    yes, each time.

    Stef

    (@serafinnyc)

    Odd, can you go to WooCommerce and then Settings and then Site Visibility tab and see what’s checked. Is it set to Coming Soon?

    It’ll look like this

    Thread Starter toodles53562

    (@toodles53562)

    Yay!!! That fixed it!! You are brilliant!!!

    Stef

    (@serafinnyc)

    I’ve been called worse ?? Glad to hear @toodles53562 so that’s a new feature in Woo and it’s been buggy of late and especially when updating Woo. Glad it’s good now. Take care and have a great weekend!

Viewing 15 replies - 1 through 15 (of 16 total)
  • You must be logged in to reply to this topic.