Ultimate SEO Urls

Multilanguage Sitemaps - Ultimate SEO Urls

Multilanguage Sitemaps

by artfulweb » Sat Jul 09, 2022 12:45 pm

Hi there,
Just installed on Phoenix 1.0.8.16 and in the multilanguage sitemaps there is an error. The sitemapIndex.xml file indicates that the links are

https://www.mysite.com/catalog/sitemapc ... french.xml

when in reality the maps are created as
sitemapcategories_fr.xml

How could I fix that without having to modify the files manually each time?
artfulweb
VIP Member
VIP Member
Posts: 119
Joined: Thu Oct 29, 2020 12:34 pm
Contact:

Re: Multilanguage Sitemaps

by Piernas » Sat Jul 09, 2022 3:30 pm

I've looked at my test site and files are being created as sitemapCategories_english.xml - not sitemapCategories_en.xml

I'll take a look at the code as soon as I finish other tasks and try to see why is this happening in your site.
Piernas
Posts: 96
Joined: Thu Mar 11, 2021 2:16 am
Contact:

Re: Multilanguage Sitemaps

by artfulweb » Sat Jul 09, 2022 10:01 pm

Piernas wrote:I've looked at my test site and files are being created as sitemapCategories_english.xml - not sitemapCategories_en.xml

I'll take a look at the code as soon as I finish other tasks and try to see why is this happening in your site.
What is strange is that in the sitemapIndex.xml it shows them as "_english.xml" but the generated maps are "_en.xml".
artfulweb
VIP Member
VIP Member
Posts: 119
Joined: Thu Oct 29, 2020 12:34 pm
Contact:

Re: Multilanguage Sitemaps

by Piernas » Sun Jul 10, 2022 11:49 am

You were right. At some point I changed a line that controls the filename. Please change line 35 of sitemaps/index.php from:

Code: Select all

      $filename_suffix = ( $language_data['code'] == DEFAULT_LANGUAGE ) ? '.xml' : '_' . $language_data['directory'] . '.xml';
to

Code: Select all

      $filename_suffix = ( $language_data['code'] == DEFAULT_LANGUAGE ) ? '.xml' : '_' . $language_data['code'] . '.xml';
I'll correct it as soon as I receive more feedback about other issues.
Piernas
Posts: 96
Joined: Thu Mar 11, 2021 2:16 am
Contact:

Re: Multilanguage Sitemaps

by artfulweb » Mon Jul 11, 2022 1:27 pm

Piernas wrote:You were right. At some point I changed a line that controls the filename. Please change line 35 of sitemaps/index.php from:

Code: Select all

      $filename_suffix = ( $language_data['code'] == DEFAULT_LANGUAGE ) ? '.xml' : '_' . $language_data['directory'] . '.xml';
to

Code: Select all

      $filename_suffix = ( $language_data['code'] == DEFAULT_LANGUAGE ) ? '.xml' : '_' . $language_data['code'] . '.xml';
I'll correct it as soon as I receive more feedback about other issues.
Perfect, thank you!
artfulweb
VIP Member
VIP Member
Posts: 119
Joined: Thu Oct 29, 2020 12:34 pm
Contact: