con_content router changes

Support forum dedicated to free and advanced Joomla content presentation module with various layout options and data sources support.
GK User
Fri Jan 17, 2014 1:35 pm
Hello,

after updating Joomla from 2.5.16 to 2.5.17 I've noticed that article links in NSP GK5 v1.3.5 were displayed incorrectly:
instead of
Code: Select all
http://www.sample.com/lt/bendros-naujienos/154-naujiena-nr-1
it shows up as
Code: Select all
http://www.sample.com/lt/component/content/article/23-lt/bendros-naujienos/154-naujiena-nr-1

I found that this issue is being caused by the changes in the /components/com_content/helpers/helper.php file.
Could anyone from the Gavick team could take a look at it and see if it's a bug or NSP module needs to be updated for it to work correctly?
Thanks in advance! :)
User avatar
Senior Boarder

GK User
Fri Jan 17, 2014 6:58 pm
Hello,

I've just fixed this problem yesterday ;)

Please apply changes from this commit: https://github.com/GavickPro/News-Show- ... e8c3a1f2fe

This fix will be included in the upcoming v.1.4 update.
User avatar
Administrator

GK User
Tue Jan 21, 2014 10:24 am
Great! Will try it today and report back.

dziudek wrote:Hello,

I've just fixed this problem yesterday ;)

Please apply changes from this commit: https://github.com/GavickPro/News-Show- ... e8c3a1f2fe

This fix will be included in the upcoming v.1.4 update.
User avatar
Senior Boarder

GK User
Wed Jan 22, 2014 8:13 am
Everything works fine. Thank you! :)
User avatar
Senior Boarder

GK User
Tue Feb 04, 2014 3:39 pm
Hello again,

I've just found out that the problem was fixed when the article has a language assigned to it, but when the language is set to "All" (the default value), then article route is still wrong. dziudek, could you take a look?

Here's a quick fix, but maybe there's a better solution:
In modules/mod_news_pro_gk5/tmpl/com_content/view.php line 292:
Code: Select all
 static function itemLink($item, $config = false) { 
 
  if( $item['lang'] == '*' ){
    $lang = JFactory::getLanguage();
             $item['lang'] = $lang->getTag();
  }
  return ($item['id'] != 0) ? JRoute::_(ContentHelperRoute::getArticleRoute($item['id'], $item['cid'], $item['lang'])) : JRoute::_('index.php?option=com_users&view=login');
 }
User avatar
Senior Boarder

GK User
Wed Feb 05, 2014 1:40 am
I think that this fix: https://github.com/GavickPro/News-Show- ... 7d470cde27 will be better solution - then the lang key in the item will be always set - in your example you should set the lang key in all functions separately.
User avatar
Administrator

GK User
Wed Feb 05, 2014 7:21 am
Ok, thanks! :)
User avatar
Senior Boarder


cron