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).
Comment | File | Size | Author |
---|---|---|---|
skip-unaliased.patch | 5.41 KB | flyke | |
after-2.PNG | 124.85 KB | flyke | |
after-1.PNG | 80.4 KB | flyke | |
before-4.PNG | 40.59 KB | flyke | |
before-3.PNG | 26.26 KB | flyke |
Comments
Comment #2
gbyte CreditAttribution: gbyte as a volunteer and commentedI 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.
Comment #3
gbyte CreditAttribution: gbyte as a volunteer and commentedClosing due to lack of activity.
Comment #4
gbyte CreditAttribution: gbyte as a volunteer and at gbyte commentedComment #5
gbyte CreditAttribution: gbyte as a volunteer and at gbyte commented