Tagadelic currently includes unpublished posts which makes clouds appear bigger to users then their actual content is.

In line 209 change
$result = db_query_range('SELECT COUNT(*) AS count, d.tid, d.name, d.vid FROM {term_data} d INNER JOIN {term_node} n ON d.tid = n.tid WHERE d.vid IN ('. substr(str_repeat('%d,', count($vids)), 0, -1) .') GROUP BY d.tid, d.name, d.vid ORDER BY count DESC', $vids, 0, $size);

to

$result = db_query_range('SELECT COUNT(*) AS count, d.tid, d.name, d.vid FROM {term_data} d INNER JOIN {term_node} n ON d.tid = n.tid JOIN {node} o USING (nid) WHERE d.vid IN ('. substr(str_repeat('%d,', count($vids)), 0, -1) .') AND o.status = 1 GROUP BY d.tid, d.name, d.vid ORDER BY count DESC', $vids, 0, $size);

Comments

javi-er’s picture

this works for 6.x-1.2 too, the only difference is that it's in line 228

HedgeMage’s picture

subscribe

frank ralf’s picture

Version: 5.x-1.0 » 6.x-1.2
Status: Patch (to be ported) » Needs review
StatusFileSize
new1.48 KB

I applied this modification successfully to Tagadelic 6.x-1.2 and rolled it into a proper patch, might also work for 5 version.

Frank

HedgeMage’s picture

Status: Needs review » Reviewed & tested by the community

I've tested this on a couple of sites, and it is working beautifully! I suspect it should probably be against head or the dev version, but I'm not sure if the maintainers mind either way, so leaving as "needs review".

--Susan

HedgeMage’s picture

Status: Reviewed & tested by the community » Needs review

Fixing the accidental RTBC above (see the non-matching comment).

Bèr Kessels’s picture

Status: Needs review » Needs work

please remove the commented lines from the patch.

Bèr Kessels’s picture

Version: 6.x-1.2 » 6.x-1.x-dev

work against dev please

frank ralf’s picture

Will do. Just one question: Which CVS branch shall I use?

Tagadelic 6.x-1.x-dev is taken from CVS branch DRUPAL-6--1 (http://drupal.org/node/227507) but HEAD seems to be more current.

http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/tagadelic/?...
http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/tagadelic/?...

tia
Frank

Bèr Kessels’s picture

@Frank: if git suits you, you can fire against http://github.com/berkes/tagadelic
Else, you choose: 6.x-1.xdev, or 6.x-1.2 will both work. I will make sure a patch commits. And since I do that in git, merging and fiddling is rather easy :)

So: whatever suits you. My remark above was not for the patch, but for bugtracking. :)

frank ralf’s picture

StatusFileSize
new4.61 KB

@Bèr
Thanks for the hint. There has been a lot of excitement around git lately but I'm busy enough to understand even one version control system sufficiently so I will stay with CVS for a while ;-)

I rolled the patch again against DRUPAL-6--1 from CVS. And while I was at it, I also ran the module through Coder and amended some minor glitches.

hth
Frank

summit’s picture

Subscribing, greetings, Martijn

tormu’s picture

I've tried the modified SQL query part with 5.x-1.1 and seems to work without problems.

Anonymous’s picture

Tried this with 6.x. Works fine. Why is the status still "needs work"?

frank ralf’s picture

Status: Needs work » Reviewed & tested by the community

Because nobody had changed it yet ;-)

jahjah92’s picture

hi,

patch tagadelic.411852.2.patch works for me ( flush all caches ... )

why this patch is not include in the stable release 6.x-1.2 ?

Bèr Kessels’s picture

Status: Reviewed & tested by the community » Needs work

last patch contains much more then just this fix. please keep the focus, else merging and maintaining becomes a hell (mostly because CVS sucks big time).

frank ralf’s picture

@Bèr

That's because I also ran the module code through Coder, sorry for the inconvenience. Will try to roll the patch again against current version ASAP.

Frank

EDIT:
Don't blame CVS for everything ;-)
BTW I already have to use SVN for another project so why not make it three and give git a try...

frank ralf’s picture

StatusFileSize
new1.25 KB

Rolled the patch anew against 6.x-1.x-dev version, only the SQL change. Hope to see it soon in 6.x-1.3 ;-)

frank ralf’s picture

Status: Needs work » Needs review

Changed status accordingly.

Tip: Use Dreditor for reviewing patches.

@Bèr
Sorry, I still don't GIT it...

Bèr Kessels’s picture

Status: Needs review » Reviewed & tested by the community

Looks good. Can be applied in next batch of fixes.

tordrup’s picture

subscribe

Anonymous’s picture

XXXX - sorry, posted in wrong thread.

Anonymous’s picture

Any update on when this will be included in the stable version?

benlotter’s picture

See my comment on this thread http://drupal.org/node/976674#comment-4161246 which fixes BOTH the unpublished node count issue AND the node revision issue.

Bèr Kessels’s picture

Status: Reviewed & tested by the community » Fixed

I have benchmarked this, and the extra where does not add overhead. It uses an index, so is almost "free".

I have committed this.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.