Tag Cloud (Keyword); is this a bug

Tag Cloud (Keyword); is this a bug

Wednesday 27 May 2009 3:05:20 pm - 5 replies

Author Message

Andy Caiger

Wednesday 30 June 2010 8:02:37 pm

We are also seeing something strange with the tag cloud.

Looking at the Tag Cloud at /content/view/tagcloud/2, a keyword has a count of 2 objects, but when I click on the keyword and go to /content/keyword/my_keyword, I find it lists 20 objects. In fact, 20 is the correct number.

Where does the count in the Tag Cloud come from and how can I correct it? Is there a way to reset the keyword counts?

EAB - Integrated Internet Success
Offices in England, France & China.
http://www.eab.co.uk http://www.eab-china.com http://www.eab-france.com

Andre Bottin

Friday 24 September 2010 7:45:27 am

Has anyone found a way to make this work? It seems such a pity not to be able to use the tags but this error really makes the use of tags useless!!

EAB - Integrated Internet Success
Offices in England, France & China.
http://www.eab.co.uk http://www.eab-china.com http://www.eab-france.com

gilles guirand

Saturday 25 September 2010 6:51:23 am

Hi,

The keyword count is from the eztagcloud operator : /extension/ezwebin/autoloads/eztagcloud.php

Is your PHP file similar to this one ?

http://svn.ez.no/svn/extensions/ezwebin/trunk/packages/ezwebin_extension/ezextension/ezwebin/autoloads/eztagcloud.php

--
Gilles Guirand
eZ Community Board Member
http://twitter.com/gandbox
http://www.gandbox.fr

Mike Cavanaugh

Friday 04 March 2011 2:48:51 pm

Isn't there a problem with the way keywords are done?

If you add the same tag to a folder and an article you get two distinct keyword IDs with two different counts for folder and article classes. The eztagcloudoperator iterates through the keyword table and uses the keyword value as a key to construct the tags array. So, the last instance of the keyword will overwrite any previous instance.

Wouldn't it be better to see one overall count no matter which class?

Wojciech Rębisz

Tuesday 12 July 2011 4:05:58 am

Hi,

to fix the problem, You should modify code in the eztagcloud.php. Problem is in the counting keywords.

foreach( $rs as $row )
{
if (array_key_exists($row['keyword'], $tags)) {
$tags[$row['keyword']] += $row['keyword_count'];
}
else {
$tags[$row['keyword']] = $row['keyword_count'];
}
}

You must be logged in to post messages in this topic!

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.