登录 注册

登录

重要 相关内容(相关文章)模块无法显示的bug

更多
2013年10月27日 20:55 #1 作者: smcqidong
后台开启了相关文章,但前台却显示不了,后来google搜索发现确实是代码有问题,详见:http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=27873

下面这段应该是解决方案,但代码那段看不懂

I confirm the issue, this can be seen in sample data also:
index.php/using-joomla/extensions/modules/content-modules/related-items
should show a list in the module at the bottom of the article but shows nothing.

I compared the versions of the file modules\mod_related_items\helper.php

This code in version 22477 on line 82

$query->where('(CONCAT(",", REPLACE(a.metakey, ", ", ","), ",") LIKE "%'.implode('%" OR CONCAT(",", REPLACE(a.metakey, ", ", ","), ",") LIKE "%', $likes).'%")'); //remove single space after commas in keywords)

was replaced by (on line 98 and 99 in the current version)

$concat_string = $query->concatenate(array(',', 'REPLACE(a.metakey, ", ", ",")', ','));
$query->where('('.$concat_string.' LIKE "%'.implode('%" OR '.$concat_string.' LIKE "%', $likes).'%")'); //remove single space after commas in keywords)

This is causing the problem. If I turn this back to the code of 22477 the related articles are displayed again.


请高手指教,以下是目前有问题的文件:

登录 或者   注册一个会员帐号 来参与讨论

更多
2013年10月29日 19:27 #2 作者: smcqidong
在英文网站找了很多个 修复后的hleper.php文件,但上传更新后仍然前台不能显示出“相关内容”模块!

登录 或者   注册一个会员帐号 来参与讨论