I'm testing xmlsitemap out on a multilingual site as follows:
Drupal 6.6 . Using locale
Internationalization 6.x-1.0-beta6

Locale is set to use "Path prefix with language fallback."
The multilingual settings for the Page content type are "Enabled, with translation"

With these settings, and with german & norwegian installed (english default), all german pages are prefixed by /de and norwegian pages by /nb

I am using a different menu for each language. When user changes language, only the language-specific menu appears.
All translations of a page use IDENTICAL url path. So for the horses, for example:

Engish: http://www.gallaghersequestriancentre.com/horses
German: http://www.gallaghersequestriancentre.com/de/horses
Norwegian:http://www.gallaghersequestriancentre.com/nb/horses

My XML Sitemap is successfully submitting to Google, but only English pages are being submitted. If I add the German & Norwegian menus in the XMLSitemap config, it doesn't change.

I suspect this is because the the language prefix isn't part of the paths per se, it is automatically added by Locale.

It may be that my use of I8n or identical paths is non-standard, if someone can steer me in the right direction let me know. In any case, is there a way to force XMLSiteMap to include the other language pages? My guess is that a simple workaround is to create a new menu that points to every page with explicit paths and include it in XML SIteMap. Not pretty but I'll try it unless there are other ideas out there.

Comments

apaderno’s picture

Assigned: Unassigned » apaderno
Status: Active » Postponed

At the actual state, the project modules don't support sites with locale active. I am working to introduce that.

apaderno’s picture

Status: Postponed » Active

What you are doing is not the exact way to do it, anyway.
If you want to the content in German, i.e., you must access the page with the German prefix (in your example, http://www.gallaghersequestriancentre.com/de/horses); it's not possible to mix pages with different languages.

In the case of XML Sitemap, for German language the site map would be at http://www.gallaghersequestriancentre.com/de/sitemap.xml, and it would list all the pages in German, or without any language associated.

apaderno’s picture

Title: localised pages not appearing in sitemap » Localized pages do not appear in site map
hass’s picture

No, that's incorrect. xmlsitemap needs to have all languages in one file if there are multiple languages. I'm also using the above config and we need one sitemap for all languages.

hass’s picture

Category: support » feature
hass’s picture

Category: feature » task

Nope. i18n is standard core feature. This is a task in D6 not a feature.

apaderno’s picture

Category: task » support

Actually, the report is an support request, because forst was asking how to use XML Sitemap for localized content, as he was not able to use it.

hass’s picture

Category: support » task

Yes and we figured out that this D6 core functionality is not yet implemented in latest xmlsitemap DEV. As it is missing we need to add it. I think he have already understood that there is something missing. He was only so kind to ask if this is his fault or missing code or functionality.

Could you please understand and accept that cases sometimes need to change their priority and category and status!? This is why this fields are changeable. THX for your insight.

apaderno’s picture

Category: task » support

"we"? Who voted you into public office?

Still, he submitted a support request describing a functionality that is not still present.
The report will stay a support request because, even with the functionality implemented, he could not understand how to use it; from the description he gave, I assume he didn't understand how the support for different language is done (but I would also add that somebody else didn't understand that).

Already we saw you have different opinions, and that you would classify a form using a Submit button when the Drupal guidelines suggest to use Save like a bug (when that usually mean code bug); already we saw that in some occasions you were wrong about what you were saying; already we saw that you pretend explanations from the others, but you don't like to give any to the others.

frost’s picture

Component: xmlsitemap » Other

from the description he gave, I assume he didn't understand how the support for different language is done

Would you let me know what I am doing incorrectly and how I should change it?
This will be very helpful. Thanks!

Also note that I just checked my sitemap (http://www.gallaghersequestriancentre.com/sitemap.xml) and it shows the German & Norwegian pages after the English ones, but the non-english ones all appear with their node/* addresses and not their correct /de/* and /nb/* addresses.

hass’s picture

Component: Other » xmlsitemap.module

@Kiam: "We" are the community. You may have missed this. This problem in missing functionality is know for a long time and I think I've said it sometimes in November/December 2007 or so.

apaderno’s picture

@hass: We includes also me. I simply meant that there have not been any elections to vote the representative of the Drupal community, and you weren't appointed to that office.

I find strange that you talk of community when in one of your comments you wanted me to apply a patch of yours saying don't ask any further, and apply the patch (the sense was that, even if the words were not exactly those I used here); I find also strange that you talk of community when you were contrary to asking the opinion of other people about a feature request.

The problem could be well known, but the project was developed not taking in consideration the localization of Drupal, nor the use of languages different from English. I started to change the code to support multi-language sites in very recent times, compared to the time passed from when the project has been created.
As this is not the only issue to resolve in the project code, it is taking more time to resolve it than it would take if this should be the only issue that needs to taken care of.

yo-1’s picture

I confirm the behaviour of the missing extra languages in the sitemap.

In my installation (language setting is 'path prefix only') , I have English as default, and 90% of pages are also available translated in Dutch and German (French to follow soon perhaps).

In the XMLsitemap only the English node is represented with its full clean URL. Next to that, all 3 language versions are shown as node/*.

So my '//sitename/about-us' page (node 20) is present 2 times, as:
- //sitename/about-us
- //sitename/node/20
The translated Dutch and German pages are only present as:
- //sitename/node/21
- //sitename/node/22

My main question (just like frost) is:
- am I doing something wrong in my settings that causes this (and if so, how can I solve it)
or
- is this the present status/behaviour of the combined Drupal 6 core/locale/XMLsitemap/i18N functionality (and if so, will it be solved later and by when???)

apaderno’s picture

@frost: the project code doesn't completely support multi-language sites. I am changing it, but the support is not complete, for the moment.

About the issue you are seeing, I would check if Drupal is setting the aliases of the node paths also for languages different from English. It seems that Drupal doesn't set the alias of a node path in all languages.
I found a reference to that problem in the Pathauto issue queue, and I don't remember in which report it is; I will check for that, and I will report it here.

andreiashu’s picture

A good idea would be to update the project page an clearly state that multi language feature for this module is currently being developed (and people should join to help if they can). I think it is wasted way too much time explaining people that this feature is currently unavailable and why. We should focus developing it, not answering complaints...
Just my opinion.

apaderno’s picture

In the Pathauto issue queue there is a report that can be related to this support request (#357185: template base_path() code - breaking il8n menu links).

apaderno’s picture

Title: Localized pages do not appear in site map » Localized aliases don't appear in the site map

As I given an explanation for the issue reported, I am going to set this support request to fixed.
This report should be set to active only if there are any reasons to think the issue is caused from XML Sitemap, which is not the case as the project code is using url(); if for any reason the path aliases are not being set, there is nothing XML Sitemap can do.

-- Kiam
Kiam la luno renkontas la sunon

apaderno’s picture

Status: Active » Fixed
hass’s picture

Title: Localized aliases don't appear in the site map » Localized pages do not appear in site map
Status: Fixed » Active

@kiam: The major difference is that you expect feedback and if you don't get it after only ~1 week in a issue queue that not many people monitoring - you simply close a case. This is a big very difference. Good that we have now some people caught by this topic... this is not a support request as already said in #5 -> feature. *Plonk*

hass’s picture

Status: Fixed » Active

#17: It's an inability of URL() as I know. That's why we have had a xmlsitemap_url function in past that have allowed us to implement a workaround if core does not provide the way we need for xmlsitemap...

hass’s picture

Status: Active » Fixed

cross post

apaderno’s picture

@#19: I don't close reports, but I set them to fixed; that is normal for support requests, once an answer for the question asked has been given from the maintainer. If you look around, it's not just me to set the support requests to fixed when a feedback is not given in reasonable time.

@#20: The function you are talking of (xmlsitemap_url()) didn't have a fix for this, but it was simply a workaround to avoid to add the language prefix to the URLs being returned, which is exactly the opposite of what a module should do if it supports multi-language sites.
url() doesn't have any problems; the problem is with the code that set the alias of a path which doesn't set the alias for a language when there is already an alias set for a different language. This means that the database table only contains one path alias per path, and using proprietary code would not resolve the problem; or to be precise, it could resolve the problem if the code would duplicate the path aliases settings page, and would save the path aliases in its own database table (which is not the right way to proceed).

Anyway, the answer would not have been different if this would have been a feature request; in that case I would have replied that XML Sitemap cannot do anything for a bug present in code of other modules.

apaderno’s picture

Title: Localized pages do not appear in site map » Localized aliases don't appear in the site map
Status: Active » Fixed

I corrected (again) the report title because the problem is not with the pages in different languages not being added to the site map, but it's that the URLs of those pages are not aliased.

-- Kiam
Kiam la luno renkontas la sunon

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

ayalon’s picture

I have the same issue and it is still not fixed. All link in additional languages are displayed like this:

node/23

The correct URL is:

en/name-of-the-page

I will investigate further.

ayalon’s picture

This issue come from the menu links (i18n-Menu) and the xmlsitemap_menu.

If you enable the option:
Add all the links to the default language site map

then it does not work. If I disable xmlsitemap_menu and this option I can access two sitemaps for each language with correct urls:

http://localhost/testsite/sitemap.xml
http://localhost/testsite/en/sitemap.xml

Better would be a solution, that displays all links of all language in ONE sitemap.xml