woocommerce product search

#369947
  • Hi,
    I have Rank Math free version on this website https://www.fotodigitalipisa.it/.

    I have a Woocommerce shop here https://www.fotodigitalipisa.it/store/ and I got a fatal error when searching for a product in the “search product” widget. I’m not using a plugin for this, it’s the native “search product widget”.
    In debug mode it talks about /home/nfotodik/public_html/wp-content/plugins/seo-by-rank-math/includes/frontend/class-breadcrumbs.php on line 273
    (see whole code below).
    I understand the issue is caused on line 273, and lines from 272 to 274 are as follow but I dont’t know how to correct the issue

    private function add_crumbs_search() {
    $this->add_crumb( sprintf( $this->strings[‘search_format’], get_search_query() ), Security::remove_query_arg_raw( ‘paged’ ) );
    }

    What do you suggest?
    Thanks

    Fatal error: Uncaught ValueError: Missing format specifier at end of string in /home/nfotodik/public_html/wp-content/plugins/seo-by-rank-math/includes/frontend/class-breadcrumbs.php:273 Stack trace: #0 /home/nfotodik/public_html/wp-content/plugins/seo-by-rank-math/includes/frontend/class-breadcrumbs.php(273): sprintf(‘Risultati per %’, ‘tazza’) #1 [internal function]: RankMathFrontendBreadcrumbs->add_crumbs_search() #2 /home/nfotodik/public_html/wp-content/plugins/seo-by-rank-math/includes/frontend/class-breadcrumbs.php(231): call_user_func(Array) #3 /home/nfotodik/public_html/wp-content/plugins/seo-by-rank-math/includes/frontend/class-breadcrumbs.php(174): RankMathFrontendBreadcrumbs->generate() #4 /home/nfotodik/public_html/wp-content/plugins/seo-by-rank-math/includes/modules/schema/snippets/class-breadcrumbs.php(34): RankMathFrontendBreadcrumbs->get_crumbs() #5 /home/nfotodik/public_html/wp-content/plugins/seo-by-rank-math/includes/modules/schema/class-jsonld.php(248): RankMathSchemaBreadcrumbs->process(Array, Object(RankMathSchemaJsonLD)) #6 /home/nfotodik/public_html/wp-includes/class-wp-hook.php(309): RankMathSchemaJsonLD->add_context_data(Array) #7 /home/nfotodik/public_html/wp-includes/plugin.php(233): WP_Hook->apply_filters(Array, Array) #8 /home/nfotodik/public_html/wp-content/plugins/seo-by-rank-math/includes/traits/class-hooker.php(102): apply_filters_ref_array(‘rank_math/json_…’, Array) #9 /home/nfotodik/public_html/wp-content/plugins/seo-by-rank-math/includes/modules/schema/class-jsonld.php(150): RankMathSchemaJsonLD->do_filter(‘json_ld’, Array, Object(RankMathSchemaJsonLD)) #10 /home/nfotodik/public_html/wp-includes/class-wp-hook.php(307): RankMathSchemaJsonLD->json_ld() #11 /home/nfotodik/public_html/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters(NULL, Array) #12 /home/nfotodik/public_html/wp-includes/plugin.php(522): WP_Hook->do_action(Array) #13 /home/nfotodik/public_html/wp-content/plugins/seo-by-rank-math/includes/traits/class-hooker.php(88): do_action_ref_array(‘rank_math/head’, Array) #14 /home/nfotodik/public_html/wp-content/plugins/seo-by-rank-math/includes/frontend/class-head.php(157): RankMathFrontendHead->do_action(‘head’) #15 /home/nfotodik/public_html/wp-includes/class-wp-hook.php(307): RankMathFrontendHead->head(”) #16 /home/nfotodik/public_html/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters(NULL, Array) #17 /home/nfotodik/public_html/wp-includes/plugin.php(474): WP_Hook->do_action(Array) #18 /home/nfotodik/public_html/wp-includes/general-template.php(3042): do_action(‘wp_head’) #19 /home/nfotodik/public_html/wp-content/themes/astra/header.php(26): wp_head() #20 /home/nfotodik/public_html/wp-includes/template.php(770): require_once(‘/home/nfotodik/…’) #21 /home/nfotodik/public_html/wp-includes/template.php(716): load_template(‘/home/nfotodik/…’, true, Array) #22 /home/nfotodik/public_html/wp-includes/general-template.php(48): locate_template(Array, true, true, Array) #23 /home/nfotodik/public_html/wp-content/plugins/woocommerce/templates/archive-product.php(20): get_header(‘shop’) #24 /home/nfotodik/public_html/wp-includes/template-loader.php(106): include(‘/home/nfotodik/…’) #25 /home/nfotodik/public_html/wp-blog-header.php(19): require_once(‘/home/nfotodik/…’) #26 /home/nfotodik/public_html/index.php(17): require(‘/home/nfotodik/…’) #27 {main} thrown in /home/nfotodik/public_html/wp-content/plugins/seo-by-rank-math/includes/frontend/class-breadcrumbs.php on line 273

Viewing 11 replies - 1 through 11 (of 11 total)
  • Hello,

    Thank you for contacting Rank Math today.

    Please head over to WordPress Dashboard > Rank Math > General Settings > Breadcrumbs and change the value of “Search Results Format” to the following:

    
    Risultati per %s
    

    ​​​​​​This should help get rid of the error message on your website.

    Don’t hesitate to get in touch if you have any other questions.

    Hello,

    I have updated the sensitive data as requested. Can you please check further?

    Thank you.

    Hi,
    I did as suggested (see screenshot) but unfortunately it’s not working.

    If you try yourself to look for “bottiglia” it will show the product (there is only 1 “bottiglia” in the shop). but if you look for “cuscino”, of which there are 4 or 5 products with a similar name, or for “zaino” which doesn’t exist, it still shows the error.

    Any other suggestion?

    Prabhat
    Rank Math agency

    Hello,

    We might need to take a closer look at the settings. Please edit the first post on this ticket and include your WordPress & FTP logins in the designated Sensitive Data section.

    Please do take a complete backup of your website before sharing the information with us.
    Sensitive Data Section

    It is completely secure and only our support staff has access to that section. If you want, you can use the below plugin to generate a temporary login URL to your website and share that with us instead:

    https://wordpress.org/plugins/temporary-login-without-password/

    You can use the above plugin in conjunction with the WP Security Audit Log to monitor what changes our staff might make on your website (if any):

    https://wordpress.org/plugins/wp-security-audit-log/

    We really look forward to helping you.

    Hello,

    I have updated the sensitive data as requested. Can you please check further?

    Thank you.

    Hi
    thanks for the support

    Looking forward to your reply,
    Alessandra

    Prabhat
    Rank Math agency

    Hello,

    I logged into your website’s admin area and upon investigating, I found that your theme “Astra Child” is causing the issue and showing the critical error when searching for a non-existing product on the store.

    Please have a look at the screencast in the sensitive data section of this ticket. You can get in touch with the devs of the theme as they might already have a solution for the issue and they would be in a better position to assist you.

    Hope this helps.

    Thank you.

    Hello Prabhat,
    thank you for your answer and help. I contacted Astra theme support and they answered fast but pointed out that the issue is caused by Rank Math plugin, as suggested by the final lines of the fatal error

    thrown in /home/nfotodik/public_html/wp-content/plugins/seo-by-rank-math/includes/frontend/class-breadcrumbs.php on line 273

    I suggested that by changing the theme the issue was not showing, and they answered that “On the code level, it’s coming from RankMath, not from Astra. And the issue is due to their breadcrumb feature. There might be a function from Rank Math that is causing conflict with our theme. This is a code-level error requiring Rank Math support assistance. I can suggest getting in touch with Rank Math support for further inspection.”

    Can you help me any further?
    If the developers of Rank Math and Astra theme cannot find a solution, I surely cannot either.

    Thank you

    Hello,

    You did not update the settings mentioned here according to our message: https://support.rankmath.com/ticket/woocommerce-product-search/?view=all#post-370332

    We logged in to your website and did that which is no longer returning an error on the search pages.

    Don’t hesitate to get in touch if you have any other questions.

    I’m sorry, I thhought I did but it was probabluy the wrong way.
    Thanks a lot

    Hello,

    We are super happy that this ticket is now resolved. If you have any other questions in the future, know that we are here to help you.

    Thank you.

Viewing 11 replies - 1 through 11 (of 11 total)

You must be logged in to reply to this ticket.