Tag Cloud (Keyword); is this a bug

Author Message

Softriva .com

Wednesday 27 May 2009 3:05:20 pm

Hello,

There is a weired thing in tag cloud which is as follows:

if there are five articles under for example a folder and each of these articles has a keyword XYZ, then the Tag Clouds have a 5 object tagged with XYZ. Now, if a edit the folder and I added the tag XYZ, I ended up with a 1 object tagged with XYZ.

If I look to the ezkeyword table in the database, I see the word XYZ (for the folder has a different ID).

This can be demonstrated, by looking at an ezwebin site and clicking the Tag Cloud. The tag Training will have 5 objects.

Now edit the Training Front Page and add the tag training to it and see the result by clicking the Tag Cloud again. You will see that the Tag Training now has only one object rather than 6 objects and its size is small.

Any ideas?

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'];
}
}

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

eZ debug

Timing: Jan 30 2025 00:53:14
Script start
Timing: Jan 30 2025 00:53:14
Module start 'layout'
Timing: Jan 30 2025 00:53:14
Module start 'content'
Timing: Jan 30 2025 00:53:14
Module end 'content'
Timing: Jan 30 2025 00:53:14
Script end

Main resources:

Total runtime0.0182 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0050 588.1328151.2109
Module start 'layout' 0.00500.0022 739.343836.6484
Module start 'content' 0.00720.0088 775.992298.1875
Module end 'content' 0.01600.0022 874.179737.9922
Script end 0.0181  912.1719 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002513.8004140.0002
Check MTime0.00115.9293140.0001
Mysql Total
Database connection0.00063.065010.0006
Mysqli_queries0.002312.557930.0008
Looping result0.00000.061710.0000
Template Total0.00179.410.0017
Template load0.00094.710410.0009
Template processing0.00084.655310.0008
Override
Cache load0.00063.214610.0006
General
dbfile0.004424.471680.0006
String conversion0.00000.028940.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs