Forums / Setup & design / keyword_count in blogs returning wrong values

keyword_count in blogs returning wrong values

Author Message

Quoc Huy Nguyen Dinh

Thursday 27 November 2008 5:06:23 pm

Hi,

I've setup a blog on my website by overriding the ezwebin templates.
I just noticed that under the tag clouds the list of tags is displaying the number of blog posts that has been tagged with the keywords. But that number is wrong.

See my blog here: http://www.qhphotography.com/Blog/
For the tag "Female Models" it says 6 posts but there is only 3, "DIY Photography (3)" but actually 2....
Note: I'm not talking about the tags cloud, but the list below it with numbers in parenthesis.

The template is using the following code:

{fetch( 'content', 'keyword_count', hash( 'alphabet', $keyword.keyword, 'classid', 'blog_post','parent_node_id', $used_node.node_id ) )}

Is it a known bug or is it me bugging with a setup ?

Thanks

Quoc Huy Nguyen Dinh

Tuesday 02 December 2008 5:48:08 am

I've found the bug.
The templates is using the fetch function to fetch for 'keyword_count' but it is counting every posts in all translated version, so if you are translating a blog post in 3 languages using the same keyword as tag, the count will display 3 blog posts available for that keyword in what ever language siteaccess you are in...

André R.

Tuesday 02 December 2008 9:55:02 am

Thanks for the bug report, actually it is reported before:
http://issues.ez.no/IssueView.php?Id=12584&activeItem=2

If you have any patch, please add it in a comment there, that would speed up the process of getting it fixed, as long as the patch is clean of course ;)

Also: your '2nd bug' should have its own issue

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom