-
Hi — Bhanu told me to submit this ticket. A recent generate press update Rank Math caused a critical error after using the new popup style search bar.
I was able to determine the conflict was with RM and just disabled it and now the site is working fine.
Let me know what documentation you may need (specific file).
Thanks!
-
Hello,
Thank you for contacting us again. We’re sorry that you’re experiencing this issue with our plugin. We appreciate your cooperation and patience as we try to find a solution for you.
To be able to help troubleshoot this, we’ll need to see your debug log to understand what is causing the error on your website. The debug log is a file that records any errors or warnings that occur on your site. It can help us identify and fix the problem faster.
To share your debug log with us, please follow these steps carefully:
- Open your wp-config.php file. You can find it in the root folder of your site, usually in /public_html/ or /www/.
- Before the line that says /* That’s all, stop editing! Happy blogging. */, add this code:
// Enable WP_DEBUG mode define( 'WP_DEBUG', true ); // Enable Debug logging to the /wp-content/debug.log file define( 'WP_DEBUG_LOG', true ); // Disable display of errors and warnings define( 'WP_DEBUG_DISPLAY', false ); @ini_set( 'display_errors', 0 );
This code will enable the debug mode and create a debug.log file in the /wp-content/ folder of your site.
- Go to your website and activate the Rank Math plugin. This will trigger the error and generate the debug.log file.
- Then go to the /wp-content/ folder of your site and look for the debug.log file. It should contain some information about the error that occurred.
- Send us a copy of the debug.log file. You can use a service like wetransfer.com to upload it and share the link with us.
- Please navigate to Rank Math > Status & Tools > Version Control and rollback to the previous version as we investigate this further.
We hope these instructions are clear and easy to follow. If you have any difficulty or questions, please let us know. We’re here to help you.
Thank you for using Rank Math.
SOrry for the delay. I am on an Imac! It came up with debugging php file. I am not sure if it is the same one as there isn’t a file named as above.
<?php
/**
* Redirection debugging template.
*
* @package RankMath
* @subpackage RankMath\Redirections
*/use RankMath\Helper;
defined( ‘ABSPATH’ ) || exit;
?>
<!DOCTYPE html>
<html xmlns=”http://www.w3.org/1999/xhtml” <?php language_attributes(); ?>>
<head>
<title><?php esc_html_e( ‘Rank Math SEO Redirection Debugger’, ‘rank-math’ ); ?></title>
<meta name=”viewport” content=”width=device-width”/>
<meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″/><?php $this->do_action( ‘redirection/debugger_head’ ); ?>
</head>
<body>
<div class=”rank-math-redrection-debug”>
<h1><?php esc_html_e( ‘Redirection Debugger’, ‘rank-math’ ); ?></h1>
<p>
<?php esc_html_e( ‘Redirecting from ‘, ‘rank-math’ ); ?>/<?php echo esc_html( $this->args['uri'] ); ?>
<?php esc_html_e( ‘ To ‘, ‘rank-math’ ); ?>args['redirect_to'] ); ?>"><?php echo esc_url( $this->args['redirect_to'] ); ?>
</p><div class=”rank-math-redirection-loading-animation”>
plugin_url() . ‘assets/admin/img/loader.svg’ ); ?>”>
</div>
<div class=”rank-math-redirection-loading-timer”>
<?php /* translators: countdown seconds */ ?>
<span class=”redirection-timer”><?php printf( esc_html__( ‘Redirecting in %s seconds…’, ‘rank-math’ ), ‘<span id=”redirection-timer-counter”>5</span>’ ); ?></span><br />
<?php esc_html_e( ‘Stop Redirection’, ‘rank-math’ ); ?>
</div>
<div class=”rank-math-redirect-debug-continue” style=”display: none;”>
args[‘redirect_to’] ); ?>”><?php esc_html_e( ‘Continue redirecting’, ‘rank-math’ ); ?>
</div><p>
<?php $rank_math_redirections_page_url = Helper::get_admin_url( ‘redirections’ ); ?>
<?php if ( isset( $this->args[‘matched’][‘id’] ) ) : ?>
args[‘matched’][‘id’] ) ); ?>”><?php esc_html_e( ‘Manage This Redirection’, ‘rank-math’ ); ?>
<?php esc_html_e( ‘or’, ‘rank-math’ ); ?>
<?php endif; ?>
“><?php esc_html_e( ‘Manage All Redirections’, ‘rank-math’ ); ?>
</p><p class=”rank-math-redirection-debug-info”>
<?php echo wp_kses_post( __( ‘Note: This interstitial page is displayed only to administrators. Site visitors are redirected without delay.’, ‘rank-math’ ) ); ?>
</p><?php if ( $this->args[‘cache’] ) : ?>
<?php esc_html_e( 'Served from cache', 'rank-math' ); ?>
<?php endif; ?>
</div><?php $this->do_action( ‘redirection/debugger_footer’ ); ?>
</body>
</html>ps rolling back didn’t help but i am beginning to think it conflicts with ad blogger as it seemed to work on my phone which does not have an ad blocker.
Hello,
Thank you for your patience.
The file you have shared is from the Rank Math redirection debugger file.
The error log will be found on your website’s root directory. You may get in touch with your web host as well to help you locate the log file so we can check.
Meanwhile, if the issue persists with the ad blocker, then you may try disabling it temporarily and checking again the feature.
You can also try using a different internet browser (without ad blocker) to test if it’s really the cause.
Let us know how this goes.
I’m very sorry for the delay. My computer was in the shop and I’, unable to generate a log file. The code is correct on the config file.
I replicated the error several times in the current theme and a basic theme and nothing was generated.
I did so with only Rank Math enabled — nothing changes the critical error after using the search bar.
Going back to prior version didn’t fix the error either. The only thing that works is turning RM off, so I am going to go through and check my code and wait it out. Thanks
Hello,
Sure, let us know how this goes.
Meanwhile, please don’t hesitate to contact us anytime if you have other questions to assist you further.
Looking forward to helping you.
Thank you.
Okay thanks a lot. I asked my hosting company and got the logs:
#0 private/public_html/wp-content/plugins/seo-by-rank-math/includes/frontend/class-breadcrumbs.php(273): sprintf()
#1 [internal function]: RankMath\Frontend\Breadcrumbs->add_crumbs_search()
#2 private/public_html/wp-content/plugins/seo-by-rank-math/includes/frontend/class-breadcrumbs.php(231): call_user_func()
#3 private/public_html/wp-content/plugins/seo-by-rank-math/includes/frontend/class-breadcrumbs.php(174): RankMath\Frontend\Breadcrumbs->generate()
#4 private/public_html/wp-content/plugins/seo-by-rank-math/includes/modules/schema/snippets/class-breadcrumbs.php(34): RankMath\Frontend\Breadcrumbs->get_crumbs()
#5 private/public_html/wp-content/plugins/seo-by-rank-math/includes/modules/schema/class-jsonld.php(249): RankMath\Schema\Breadcrumbs->process()
#6 private/public_html/wp-includes/class-wp-hook.php(312): RankMath\Schema\JsonLD->add_context_data()
#7 private/public_html/wp-includes/plugin.php(256): WP_Hook->apply_filters()
#8 private/public_html/wp-content/plugins/seo-by-rank-math/includes/traits/class-hooker.php(102): apply_filters_ref_array()
#9 private/public_html/wp-content/plugins/seo-by-rank-math/includes/modules/schema/class-jsonld.php(151): RankMath\Schema\JsonLD->do_filter()
#10 private/public_html/wp-includes/class-wp-hook.php(310): RankMath\Schema\JsonLD->json_ld()
#11 private/public_html/wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
#12 private/public_html/wp-includes/plugin.php(565): WP_Hook->do_action()
#13 private/public_html/wp-content/plugins/seo-by-rank-math/includes/traits/class-hooker.php(88): do_action_ref_array()
#14 private/public_html/wp-content/plugins/seo-by-rank-math/includes/frontend/class-head.php(172): RankMath\Frontend\Head->do_action()
#15 private/public_html/wp-includes/class-wp-hook.php(310): RankMath\Frontend\Head->head()
#16 private/public_html/wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
#17 private/public_html/wp-includes/plugin.php(517): WP_Hook->do_action()
#18 private/public_html/wp-includes/general-template.php(3053): do_action()
#19 private/public_html/wp-content/themes/generatepress/header.php(16): wp_head()
#20 private/public_html/wp-includes/template.php(785): require_once(‘private/pub…’)
#21 private/public_html/wp-includes/template.php(720): load_template()
#22 private/public_html/wp-includes/general-template.php(48): locate_template()
#23 private/public_html/wp-content/themes/generatepress/search.php(12): get_header()
#24 private/public_html/wp-includes/template-loader.php(106): include(‘private/pub…’)
#25 private/public_html/wp-blog-header.php(19): require_once(‘private/pub…’)
#26 private/public_html/index.php(17): require(‘private/pub…’)
#27 {main}
thrown in private/public_html/wp-content/plugins/seo-by-rank-math/includes/frontend/class-breadcrumbs.php on line 273Hello,
This is most likely an issue with your Breadcrumb search result format and you can usually fix this by adding
%s
to the Search Results Format in your Breadcrumb settings. Follow these simple steps:- Go to Rank Math > General Settings > Breadcrumbs in your WordPress dashboard.
- Find the option that says Search Results Format and change it to Search for %s or anything else that has %s in it
- Save your changes and clear your website’s cache.
- Check if the search page is working properly now.
Please let us know if this solves the problem, if it does not, then please share your website login with us so we can securely help you take a closer look.
Thank you for choosing Rank Math. Have a great day!
That worked. Thank you so much! DO I need to do this?
Use the following code in your theme template files to display breadcrumbs. Learn More
<?php if (function_exists(‘rank_math_the_breadcrumbs’)) rank_math_the_breadcrumbs(); ?> OR [rank_math_breadcrumb]Hello,
That code is for adding breadcrumbs to your site. You can see an example of a breadcrumb on this ticket page
To add breadcrumbs to your site, you can use this shortcode on any page/post where you want the breadcrumb to appear:
[rank_math_breadcrumb]
OR you can add this PHP code to your website.
<?php if (function_exists('rank_math_the_breadcrumbs')) rank_math_the_breadcrumbs(); ?>
The exact place to add the code would depend on the theme you’re using but it is usually either the single.php file or the header.php file. You can learn more about adding breadcrumbs to your site here: https://rankmath.com/kb/breadcrumbs/
We hope this helps clarify the issue. If you have any other questions or concerns, please feel free to contact us again. We are always happy to assist you.
Hello,
Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.
If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.
Thank you.
The ticket ‘Critical error after update’ is closed to new replies.