Auctollo / google-sitemap-generator

GNU General Public License v2.0
11 stars 11 forks source link

Incompatibility with Polylang and Language-Based Child Pages #223

Closed antonlukin closed 4 months ago

antonlukin commented 4 months ago

Description: I am using the XML Sitemap Generator for Google plugin in conjunction with Polylang. It appears that the plugin is not handling language-based child pages correctly.

For instance, instead of generating links like /en-nz/policies/security-policy, it produces links such as /en-nz/security-policy/security-policy.

Details: I am unable to modify the permalink behavior because the sm_xml_sitemap_post_url filter is applied before the site languages modifications by Polylang.

https://github.com/Auctollo/google-sitemap-generator/blob/ebb0a687a50430f9558c060cafab933a48d64da8/class-googlesitemapgeneratorstandardbuilder.php#L268

ftownes commented 4 months ago

Thanks @antonlukin for your report. Would you please move to WordPress.org so that we can address this properly?