Forums / Developer / Tag Cloud (Keyword); is this a bug

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

eZ debug

Timing: Jan 17 2025 23:54:55
Script start
Timing: Jan 17 2025 23:54:55
Module start 'content'
Timing: Jan 17 2025 23:54:55
Module end 'content'
Timing: Jan 17 2025 23:54:55
Script end

Main resources:

Total runtime0.7693 sec
Peak memory usage4,096.0000 KB
Database Queries211

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0048 588.8281180.8359
Module start 'content' 0.00480.6407 769.6641732.6016
Module end 'content' 0.64550.1238 1,502.2656340.4297
Script end 0.7693  1,842.6953 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00400.5158210.0002
Check MTime0.00150.1962210.0001
Mysql Total
Database connection0.00070.096710.0007
Mysqli_queries0.672687.42702110.0032
Looping result0.00260.33332090.0000
Template Total0.740396.220.3701
Template load0.00220.286020.0011
Template processing0.738195.937320.3690
Template load and register function0.00020.021410.0002
states
state_id_array0.00170.220210.0017
state_identifier_array0.00100.132220.0005
Override
Cache load0.00190.2444330.0001
Sytem overhead
Fetch class attribute can translate value0.00100.135570.0001
Fetch class attribute name0.00100.1281100.0001
XML
Image XML parsing0.01121.457370.0016
class_abstraction
Instantiating content class attribute0.00000.0025100.0000
General
dbfile0.01592.0712440.0004
String conversion0.00000.000830.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
6content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
6content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
4content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 19
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs