I need to have a clean sitemap.xml which contains no /node/XX or /taxonomy/term/XX whatsoever.

If I check the box 'Skip non-existent translations' I run into several issues:
- On some sites with 3 languages links are completely removed from sitemap if they are only created in 1 language
- Taxonomy terms (that are not translated into each language) are removed from the sitemap
- View pages are removed from the sitemap

Since I really need those links in my sitemap, I created a patch that adds a new option: 'Skip unaliased items'
This will only remove items that have '/node/' or '/taxonomy/term' in their path. This way the terms and nodes that are translated still remain in the sitemap. Also my view pages are no longer removed from the sitemap using this method.

This patch should apply cleanly against current stable 8.x-2.9 version. (because it was made a little while back, I think then it applied to latest dev but I have only recently managed to make time to contribute this patch).

CommentFileSizeAuthor
skip-unaliased.patch5.41 KBflyke
after-2.PNG124.85 KBflyke
after-1.PNG80.4 KBflyke
before-4.PNG40.59 KBflyke
before-3.PNG26.26 KBflyke
before-2.PNG133.21 KBflyke
before-1.PNG74.45 KBflyke
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

flyke created an issue. See original summary.

gbyte’s picture

Category: Bug report » Support request
Status: Needs review » Postponed (maintainer needs more info)

I cannot reproduce this issue. What do you mean you need to have a 'clean' sitemap?

Usually the module generates URLS for every language regardless of the content the url is pointing to is actually translated. 'Skip non-existing translations' only shows the original content and the actual translations. So if /node/xxx has not been translated to German, it will not show /de/node/xxx. Term pages are treated equally. This option does not work for Custom non-entity links and views links yet. In these cases all variations are shown.

If you get some language variations removed, make sure the translations are actually published.

Changing to support request for now, if you find the module to work differently to what I just described, please explain how I can reproduce it.

gbyte’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)

Closing due to lack of activity.

gbyte’s picture

Status: Closed (cannot reproduce) » Fixed
gbyte’s picture

Status: Fixed » Closed (fixed)