-
Subject: Categories on Primary Language Missing from Sitemap and Not Displaying After Enabling Rank Math’s Strip Category Base
Dear Polylang Support Team,
I am experiencing an issue with Polylang Pro 3.6.4, Pol ″ylang for WooCommerce 2.1, and Rank Math SEO 1.0.243 on my WordPress site (version [insert your WordPress version here]). After enabling the “Strip Category Base” option in Rank Math SEO (under General Settings → Links), the category pages on my primary language (Russian) have stopped displaying (returning 404 errors) and are missing from the sitemap generated by Rank Math. Additionally, category pages on the secondary language (English) are also not functioning correctly.
### Details of the Issue:
– **Plugins Involved**:
– Polylang Pro: 3.6.4
– Polylang for WooCommerce: 2.1
– Rank Math SEO: 1.0.243
– WordPress: [insert your WordPress version here]
– **Problem Description**:
– After enabling “Strip Category Base” in Rank Math, category pages on the secondary language (Russian, e.g.,site.com/ru/
) return 404 errors.
– These categories are no longer included in the Rank Math sitemap (site.com/sitemap.xml
orsite.com/category-sitemap.xml
).
– Disabling “Strip Category Base” temporarily resolves the issue, but I would like to keep the shortened URLs without the/category/
base.
– **Steps Taken**:
– Verified that all categories have translations in Polylang (Languages → Term Translations) with unique slugs for both languages.
– Added the compatibility code provided by Rank Math (from https://rankmath.com/kb/polylang-compatibility/) as an MU-plugin, but the issue persists.
– Cleared all caches (site cache via WP Rocket and CDN cache via Cloudflare).
– Updated permalinks (Settings → Permalinks → Save Changes).
– Enabled WP_DEBUG and checkeddebug.log
, but no relevant errors were found.
– Confirmed that the.htaccess
file contains standard WordPress rewrite rules.
– **Polylang Settings**:
– URL format: Language is added as a directory (e.g.,/az/
,/ru/
).
– “Hide URL language information for default language” is enabled.
– All categories are assigned to the correct languages with unique slugs.
– **Rank Math Settings**:
– “Strip Category Base” is currently enabled (causing the issue).
– Categories are enabled in the Rank Math sitemap settings.
– **Example URLs**:
– Problematic Russian category:site.com/категория/
(returns 404).
– English category:site.com/en/category/
(also not displaying).
– Expected Russian category in sitemap:site.com/категория/
(missing).
– **Additional Notes**:
– The issue affects both regular categories and WooCommerce product categories.
– No other plugins seem to cause conflicts (tested by disabling all non-essential plugins and switching to the Twenty Twenty-Five theme).
– I have reviewed the Rank Math compatibility guide and applied the suggested fixes, but they did not resolve the issue.### Request:
Could you please assist in resolving this compatibility issue between Polylang Pro, Polylang for WooCommerce, and Rank Math SEO? Specifically, I need:
1. A solution to restore category pages on the primary language (Russian) while keeping the “Strip Category Base” option enabled in Rank Math.
2. Ensure that all categories (Russian and English) are correctly included in the Rank Math sitemap.
3. Any additional code or configuration recommendations to improve compatibility between Polylang and Rank Math.If needed, I can provide access to the site’s admin panel or additional logs/screenshots. Please let me know what further information is required.
Thank you for your assistance!
Best regards,
eurosec.az
r********@m******
The ticket ‘Site Language’ is closed to new replies.