• Hi, so I’ve noticed there are some issues between RankMath and Polylang.

    So far, I’ve been able to determine these conflicts:

    1. Activating the option Remove Category Base will cause inaccessible category archives;
    2. The XML Sitemaps have multiple issues: (a) for pages will only show the root homepage, not language specific homepages (b) for categories will only show URLs from the first configured language (c) for custom taxonomies will only show URLs from the default language;
    3. The Google News sitemap uses the default site language for each post;
    4. Breadcrumb text strings are not translated;

    Only for the breadcrumb text strings I have a working solution in place now. And I’ll try to remember and convey to other site admins to never touch the Remove Category Base option.

    But is is possible somehow to hook into the sitemap generation process and append language specific homepages and taxonomy term archives ? And set the correct language in the news sitemap?

    Thanks for any thoughts 🙂

    • This topic was modified 2 months, 3 weeks ago by Rolf Allard van Hagen. Reason: added one more conflict: news sitemap language
Viewing 8 replies - 31 through 38 (of 38 total)
  • Thread Starter Rolf Allard van Hagen

    (@ravanh)

    To show you the effect of your own code example, with WPML and Rank Math Pro on a dev site, please look at the source code of https://dev.status301.com/news-sitemap.xml

    The site has default language set to FR, the second language EN on a subdirectory structure. Rank Math and Rank Math Pro are current beta versions. The latest posts are in EN and FR.

    But you’ll notice both are attributed the EN language tag in the news sitemap. Not the default language but the first post language…

    Plugin Support Rank Math Support

    (@rankmathsupport)

    Hello,

    We are checking if we can have a fix in a future update of the plugin.

    For now, please remove the following code from the get_news_publication function in the class-news-sitemap.php file:
    if ( ! is_null( $this->news_publication ) ) {
    return $this->news_publication;
    }

    Hope that helps and please do not hesitate to let us know if you need my assistance with anything else.

    Thread Starter Rolf Allard van Hagen

    (@ravanh)

    For now, please remove the following code from the get_news_publication function in the class-news-sitemap.php file:
    if ( ! is_null( $this->news_publication ) ) {
    return $this->news_publication;
    }

    Yep, like I said: commenting out those lines fixes the issue…

    Plugin Support Rank Math Support

    (@rankmathsupport)

    Hello @ravanh,

    We are glad to hear that.

    We are here if you need help with anything else.

    Thread Starter Rolf Allard van Hagen

    (@ravanh)

    Hi again. You wrote earlier:

    The publication name cannot be translated and it shouldn’t. That is the name of your publication and it’s sort of a brand name. For example, you won’t see Search Engine Land publication being translated into other languages.

    But it turns out that in some cases the News Publication Name in the Rank Math news sitemap does get translated… This happens under these conditions:

    1. The Google News Publication Name in the Rank Maths settings is left empty (defaulting to the site name);
    2. The site name is translated in the Polylang string translations;
    3. The first post in the news sitemap is a translated post (not the default language).

    After this, all other entries in the news sitemap will have that same translated Publication Name…

    Plugin Support Rank Math Support

    (@rankmathsupport)

    Hello @ravanh,
     
    The site name should be a translatable string but that doesn’t mean that we should allow for translations for the publication name.
     
    Our statement is still true and we do state in the documentation that people should add the publication name exactly as it is on Google Publisher to prevent any issues.
     
    People should always add the publication name in the appropriate settings as allowing that to default to the site name is bound to create issues and inconsistencies in the future.
     
    Thank you.

    Thread Starter Rolf Allard van Hagen

    (@ravanh)

    Our statement is still true and we do state in the documentation that people should add the publication name exactly as it is on Google Publisher to prevent any issues.

    I’m not convinced. It sounds very “western” centred to me. Many Asian or Arabic news outlets have more than one name even if it’s because of the different script. Take Al Jazeera for example. Not one of the smaller news sources…

    Or RFI, a French outlet that publishes both French and English news on different subdirectories (/en/ and /fr/) of the same domain. Still, Google News shows its French news under “RFI” on https://news.google.com/publications/CAAqBggKMP33fTDk1Ak?hl=fr&gl=FR&ceid=FR%3Afr and English news under “RFI English” on https://news.google.com/publications/CAAqBwgKMJK3ogkwt4eYAg?hl=en-GB&gl=GB&ceid=GB%3Aen. Not the same Publisher name.

    Plugin Support Rank Math Support

    (@rankmathsupport)

    Hello @ravanh,
     
    Those are not the same publisher but translated. Those are two independent publishers for different languages.
     
    If you check the news from those you’ll notice that they don’t match exactly because each publication has autonomy to report differently and sometimes report on more localized news.
     
    It’s pretty common for big news publishers to have different instances per country or region but those are not mere translations but rather different publishers, hence why their publisher link is different.
     
    Don’t hesitate to get in touch if you have any other questions.

Viewing 8 replies - 31 through 38 (of 38 total)
  • You must be logged in to reply to this topic.