Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
Sitemap.xml generation with multilingual option
Hello.
I use Liferay Portal Community Edition 6.2 CE GA2 and when I generate the sitemap.xml there are errors. We use two languages: english and spanish.
For example, we have the web page "la-ups" and in the sitemap.xml it appears as you can see bellow:
<url>
<loc>http://www.ups.edu.ec/la-ups</loc>
<changefreq>daily</changefreq>
<lastmod>2015-07-03T11:56:46-05:00</lastmod>
<link href="http://www.ups.edu.ec/la-ups/en" hreflang="en-US" rel="alternate"/>
<link href="http://www.ups.edu.ec/la-ups/es" hreflang="es-ES" rel="alternate"/>
<link rel="alternate" hreflang="x-default" href="http://www.ups.edu.ec/la-ups"/>
</url>
<url>
<loc>http://www.ups.edu.ec/la-ups/en</loc>
<changefreq>daily</changefreq>
<lastmod>2015-07-03T11:56:46-05:00</lastmod>
<link href="http://www.ups.edu.ec/la-ups/en" hreflang="en-US" rel="alternate"/>
<link href="http://www.ups.edu.ec/la-ups/es" hreflang="es-ES" rel="alternate"/>
<link rel="alternate" hreflang="x-default" href="http://www.ups.edu.ec/la-ups"/>
</url>
The following links are wrong:
http://www.ups.edu.ec/la-ups/en
http://www.ups.edu.ec/la-ups/es
The links should look like this:
http://www.ups.edu.ec/en/la-ups
http://www.ups.edu.ec/es/la-ups
You can see these errors here-> http://www.ups.edu.ec/sitemap.xml?groupId=10184&privateLayout=false
Please, help me.
I use Liferay Portal Community Edition 6.2 CE GA2 and when I generate the sitemap.xml there are errors. We use two languages: english and spanish.
For example, we have the web page "la-ups" and in the sitemap.xml it appears as you can see bellow:
<url>
<loc>http://www.ups.edu.ec/la-ups</loc>
<changefreq>daily</changefreq>
<lastmod>2015-07-03T11:56:46-05:00</lastmod>
<link href="http://www.ups.edu.ec/la-ups/en" hreflang="en-US" rel="alternate"/>
<link href="http://www.ups.edu.ec/la-ups/es" hreflang="es-ES" rel="alternate"/>
<link rel="alternate" hreflang="x-default" href="http://www.ups.edu.ec/la-ups"/>
</url>
<url>
<loc>http://www.ups.edu.ec/la-ups/en</loc>
<changefreq>daily</changefreq>
<lastmod>2015-07-03T11:56:46-05:00</lastmod>
<link href="http://www.ups.edu.ec/la-ups/en" hreflang="en-US" rel="alternate"/>
<link href="http://www.ups.edu.ec/la-ups/es" hreflang="es-ES" rel="alternate"/>
<link rel="alternate" hreflang="x-default" href="http://www.ups.edu.ec/la-ups"/>
</url>
The following links are wrong:
http://www.ups.edu.ec/la-ups/en
http://www.ups.edu.ec/la-ups/es
The links should look like this:
http://www.ups.edu.ec/en/la-ups
http://www.ups.edu.ec/es/la-ups
You can see these errors here-> http://www.ups.edu.ec/sitemap.xml?groupId=10184&privateLayout=false
Please, help me.
I see you found related LPS : LPS-30767
Please create a new LPS ticket; and include the property for portal: "portal.ctx" (Login to portal as Administrator -> Control Panel -> Server Administration -> Properties -> search for portal.ctx)
If it's blank, then this is likely a bug; though support should get back to you on that; in the meantime, you can debug yourself (that is, are you developer yourself?):
Set a breakpoint for the following line:
com.liferay.portal.util.PortalImpl line 991
https://github.com/liferay/liferay-portal/blob/6.2.1-ga2/portal-impl/src/com/liferay/portal/util/PortalImpl.java#L991
And step through to see why wrong one is made; let us know if this method works for you; the site URLs are correct for me; so I'm not sure why happening to yours.
PS. Here's an old article on debugging: https://www.liferay.com/web/raymond.auge/blog/-/blogs/debugging-liferay-in-eclipse
Note it's just jdb and you can use command-line or any other IDE that supports debugging.
Please create a new LPS ticket; and include the property for portal: "portal.ctx" (Login to portal as Administrator -> Control Panel -> Server Administration -> Properties -> search for portal.ctx)
If it's blank, then this is likely a bug; though support should get back to you on that; in the meantime, you can debug yourself (that is, are you developer yourself?):
Set a breakpoint for the following line:
com.liferay.portal.util.PortalImpl line 991
https://github.com/liferay/liferay-portal/blob/6.2.1-ga2/portal-impl/src/com/liferay/portal/util/PortalImpl.java#L991
And step through to see why wrong one is made; let us know if this method works for you; the site URLs are correct for me; so I'm not sure why happening to yours.
PS. Here's an old article on debugging: https://www.liferay.com/web/raymond.auge/blog/-/blogs/debugging-liferay-in-eclipse
Note it's just jdb and you can use command-line or any other IDE that supports debugging.