-
We discovered an issue where after searching for something and then clicking on the name of a product (not the image) redirects to the homepage instead of the product page. Doing so before searching anything works as intended. Only happens on Safari, on all devices.
Disabling Rankmath fixed the issue. Using default wordpress/woocommerce search, not specific plugins.
Steps to get the bug:
– search for anything
– click on any title of a product
– redirects to the eshop’s homepage instead of selected productSearching must happen for this bug to appear.
-
Hello,
I’m sorry to hear about the issue you are facing with redirects on Safari after searching for something and clicking on a product name, which redirects to the homepage instead of the product page. It seems disabling Rank Math has resolved the problem.
Based on the behavior you described, it appears there might be a conflict between Rank Math and Safari causing this redirection issue. To troubleshoot this further, we recommend checking for any conflicts between Rank Math and other plugins or themes that might be causing this unexpected behavior.
Here are the steps you can follow to perform a quick conflict check:
- Navigate to the Troubleshooting Mode in Rank Math.
- Disable Rank Math and check if the redirection issue still occurs after searching and clicking on a product name.
- If the issue persists, try disabling other plugins one by one and check for unexpected redirections.
If after following these steps you are still facing the issue, please let us know directly at our support forum here, and our support team will assist you further in resolving this redirection problem on Safari.
Thank you for bringing this concern to our attention. We appreciate your cooperation in troubleshooting this issue.
Looking forward to resolving this for you!
Sources:
Random URLs Redirecting Even When No Redirect Was Created » Rank Math
Solving Redirection Issues Using Rank Math SEO Plugin » Rank Math
Resolving Rank Math Schema Markup Related Issues
Confirming a Theme/Plugin Conflict With Rank MathHello,
Thank you for contacting us and sorry for any inconvenience that might have been caused due to that.
Unfortunately, we are not able to replicate the issue on our end. In this case, please try to activate the Rank Math plugin again on your website and then share some affected product page URL with us so that we can check the issue further for you.
Looking forward to helping you.
Thank you.
It’s enabled now. You must do it using Safari:
First click on any product NAME and confirm that it opens up the product page as intended.
Then for the bug:
search for “espery” for example
click on any of the product NAMES
should redirect you to the homepage (which is not correct)then tap on the Locoport logo to go back to the homepage, now click on ANY product NAME and see, it redirects to the homepage again instead of the product page
/// now that I turned the plugin back on, it’s completely messed up. Search is randomly filled with a product name, even when you go to the direct homepage and not searching anything.
It’s all related to RankMath
Hello,
We have replicated the issue.
We need more details on your setup. Can you please confirm if you have the product URL base removed in the Woocommerce settings in Rank Math > General Settings?
Lastly, if you are using a multisite, ensure that you are using the latest version of Rank Math plugin. If not yet, please do update them. You may refer to our changelog page here: https://rankmath.com/changelog/
If the issue persists, 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.
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.
Hello,
The issue persists even without searching for products. The issue is related to the incorrect URLs of the products in the front end. Your products have
%20
at the end of their slug. When our plugin is enabled, the URL returns a 404 error and is redirected by our plugin to the homepage. However, when our plugin is enabled, WordPress’ template redirect feature redirects the incorrect URL to the correct product URL. Here is a quick screencast: https://i.rankmath.com/v/yBuP0HPlease check which plugin is adding the
%20
to the product URLs and fix it to make the URLs work correctly when our plugin is enabled.Hope that helps and please do not hesitate to let us know if you need our assistance with anything else.
Don’t have access to Safari myself. For me disabling RankMath fixes the issue. Screencast shows going directly to a link that already includes “%20” so that doesn’t show me anything useful nor will I be able to go through these plugins and check what adds that, if that is true. All I know is that Rankmath breaks it.
After finding a way to use Safari and making sure the issue shows, I cannot see %20 added to any links. They appear normal.
Hello,
The
%20
is added to the URLs only when you are not logged in to the site. You can right click and copy the URL of any product, then paste it in the address bar and you will see the additional%20
after the slug.To fix the issue, you will have to check from where that space unicode is being added to the slug. Or, navigate to WP Dashboard > Rank Math SEO > General Settings > Redirections and set the “Fallback Behavior” to “Default 404” so WordPress’ canonical redirect can redirect the incorrect URLs to the correct ones like it is doing when Rank Math is disabled on your site.
We still recommend figuring out why the
%20
is being added to URLs, as Google will also discover those URLs and show the Page with Redirect errors in your GSC account.Hope that helps and please do not hesitate to let us know if you need our assistance with anything else.
How would I go about finding where this issue comes from?
Hello,
There’s an additional whitespace on the file
wp-content/themes/miini/inc/woocommerce/content-product.php
on line 351 after the closing PHP tag and the last double quotes.Please make sure to remove that, clear the cache on the website, and test again the issue on the website.
Hope this helps solve your issues.
Don’t hesitate to get in touch if you have any other questions.
Thanks a ton, should be good now!
Hello,
Glad that helped!
Don’t hesitate to get in touch if you have any other questions.
We are here to help!
The ticket ‘Plugin breaks search/redirects on safari’ is closed to new replies.