Hello,
We apologize for the issue you are facing with duplicated pages in your sitemap while using Oxygen Builder and WPML with Rank Math. This can sometimes occur due to how the sitemap is generated or conflicts with other plugins.
To resolve this issue, you can try the following steps:
-
Check for Custom Canonicals: If you have set custom canonical URLs for your pages, it may cause them not to appear correctly in the sitemap. Ensure that you remove any custom canonicals and let Rank Math generate them automatically.
-
Disable Caching: If you are using a caching plugin, it might be serving an outdated version of your sitemap. You can disable caching temporarily to see if that resolves the issue.
-
Add a Filter: If the above steps do not help, you can add a filter to your theme’s rank-math.php
file to disable caching for the sitemap. Here’s the code you can add:
add_filter( 'rank_math/sitemap/enable_caching', '__return_false' );
Make sure to take a backup of your website’s file and database before making any changes to the code.
-
Check for Plugin Conflicts: Sometimes, other plugins can conflict with Rank Math. You can use the Health Check plugin to identify if there are any conflicts.
-
Regenerate Sitemap: After making these changes, regenerate your sitemap by going to Rank Math > Sitemap Settings and clicking on the "Save Changes" button.
If the problem persists after trying these solutions, please reply to this ticket, and a human agent from the Rank Math Support team will assist you further.
Thank you for raising this concern!
This is an automated reply from Rank Math Support Bot. Your ticket has been assigned to a human agent and we will get back to you shortly.
Hello,
Thank you for your query and we are so sorry about the trouble this must have caused.
Your page sitemap is currently throwing a critical error.
Please share your website’s recent error logs so we can determine what’s causing the issue.
You can follow this guide to enable debugging in WordPress
https://wordpress.org/support/article/debugging-in-wordpress/ or you can get in touch with your web host, they will help you locate the log file.
Also, as an initial troubleshooting steps, please check if there are other plugins that may be causing an issue with your page sitemap. To determine which plugin, please refer to this guide: https://rankmath.com/kb/check-plugin-conflicts/
Only the site admin would know and your users won’t be affected by this troubleshooting.
Looking forward to helping you.
Hi,
Thank you for your reply!
Unfortunately the debug mode only shows a deprecated function on the sitemap page. This should not cause a critical error, right? I have updated the sensitive data with a image of the problem. Can you please check further?
Thank you.
Hello,
Please ensure that your Rank Math and WPML plugins have been updated to the latest version.
If the issue still persists, please install and activate the WPML SEO glue plugin that helps WPML and Rank Math integration (if not yet).
You can check this article for how to do that:
https://wpml.org/compatibility/2021/04/wpml-seo-plugin-better-integration-with-seo-plugins/
Once done, please follow these steps to flush your sitemap cache:
1. Flush the Sitemap cache by following this video screencast:
https://i.rankmath.com/pipRDp
2. Exclude the Sitemap files of the Rank Math plugin in your caching plugin. The cache could be via a plugin or from the server. For plugins or Cloudflare, please follow this article:
https://rankmath.com/kb/exclude-sitemaps-from-caching/
3. Disable the transient cache for the sitemap by applying this filter. This will make sure that your XML sitemap always reflects the latest changes on your site:
/**
* Filter if XML sitemap transient cache is enabled.
*
* @param boolean $unsigned Enable cache or not, defaults to true
*/
add_filter( 'rank_math/sitemap/enable_caching', '__return_false');
If you’re not sure how to add this code, you can follow this guide:
https://rankmath.com/kb/wordpress-hooks-actions-filters/
Let us know how this goes.