J!Extensions Store™
Forum
Welcome, Guest
Please Login to access forum.
Re:Sitemaps in different languages using Falang (1 viewing) 
Go to bottom
TOPIC: Re:Sitemaps in different languages using Falang
#1200
Hrvoje Znaor
Fresh Boarder
Posts: 14
User Offline
Re:Sitemaps in different languages using Falang Karma: 1  
Hello

Do you by any chance have approx ETA for new version release?


Thanks
 
Logged Logged  
  The administrator has disabled public write access.
#1202
John Dagelmore
Admin
Posts: 3716
User Online Now
Re:Sitemaps in different languages using Falang Karma: 79  
Hello,

yes the version 3 will be released on January.
If you have difficulties to setup Falang with version 2.5 i wil send you a ready-to-install package in the meanwhile.

Greetings
 
Logged Logged  
  The administrator has disabled public write access.
#1443
Luca Pizzato
Fresh Boarder
Posts: 3
User Offline
Re:Sitemaps in different languages using Falang Karma: 0  
Hi John,
there's something wrong about the translation with the articles alias when falang is on.

if you go here: http://www.eastonline.eu/newdev/en/?option=com_jmap&view=sitemap&lang=en
and check for any article in east 51 (for example) the printed title is ok, but the artcile alias is in italian.

i made some changes to the xml view in my test site http://www.eastonline.eu/newdev/en/?option=com_jmap&view=sitemap&format=xml&lang=en

and as you can see the aliases are correctly translated.

I think is all about some issue about falang and getArticleRoute because before you have to take from the falang table the translated alias and then go with getArticleRoute to have the correct url

Contact me if can be of any help or, if this issue is only mine, how to fix it without a hack of your code.

BTW, great component!

Bye,
Luca
 
Logged Logged  
  The administrator has disabled public write access.
#1444
John Dagelmore
Admin
Posts: 3716
User Online Now
Re:Sitemaps in different languages using Falang Karma: 79  
Hello Luca and thanks a lot to post about this issue with Falang.

I know that Falang DB layer seems to ignore the query in the router.php of the com_content to retrieve the correct alias and it ignores even the 'slug' field used for the sitemap, a different approach based on PHP concatenation of id and alias should be used.

If you have found a solution in the XML view i would be pleased if you can post here or give more information as a reference for me and for other users. Moreover i can evaluate a possible integration in the next release of JSitemap. As an advice, if you needed to edit the XML view template file, it would be ideal using template overrides instead of hacking the code of the component.

Thanks again for your time and collaboration

John
 
Logged Logged  
  The administrator has disabled public write access.
#1496
Luca Pizzato
Fresh Boarder
Posts: 3
User Offline
Re:Sitemaps in different languages using Falang Karma: 0  
in the file components/com_jmap/views/sitemap/tmpl/default_xml_content.php [as a test]
line 40:
inside the if clause:

if (@$elm->slug) {

if($langCode == 'en'{
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$query->select('fc.value'
->from('#__falang_content fc'
->where('fc.reference_id = '.(int) $elm->id)
->where('fc.language_id = 1' )
->where('fc.reference_field = \'alias\''
->where('fc.reference_table = \'content\'';
//$query->select('alias'->from('#__content'->where('id = ' . (int) $item->id);
$db->setQuery($query);
$alias = $db->loadResult();

if(!isset($alias)){
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$query->select('alias'->from('#__content'->where('id = ' . (int) $elm->id);
$db->setQuery($query);
$alias = $db->loadResult();

}

$elm->slug = $elm->id.':'.$alias;

}




$seolink = JRoute::_ ( ContentHelperRoute::getArticleRoute ( $elm->slug, $elm->catslug, $elm->language ) );
}

the variable $langCode is my way to know if is asked the feed of the english language.
obviously this code is not final and works in my website with only two language.
hope it can help in some way
 
Logged Logged  
  The administrator has disabled public write access.
#1497
John Dagelmore
Admin
Posts: 3716
User Online Now
Re:Sitemaps in different languages using Falang Karma: 79  
Thanks a lot to post your suggestion, indeed some days ago i analyzed this integration with Falang a bit better and planned to add an integrated solution in the next release, indeed simlar to that you used on your site.

This happens because Falang needs to retrieve separately the id/alias of contents from DB, because otherwise it's not able to translate the slug itself.

Appreciate a lot your help.

John
 
Logged Logged  
  The administrator has disabled public write access.
Go to top