I added Edmund Haselwanter's bug fix to my copy of the "tags" extension (thanks for that fix!), and now I'm trying to display a tag_cloud. But I get this error instead of a cloud:

PGError: ERROR: column "meta_tags.id" must appear in the GROUP BY clause or be used in an aggregate function : SELECT meta_tags.*, count(*) as popularity FROM meta_tags JOIN taggings ON taggings.meta_tag_id = meta_tags.id GROUP BY taggings.meta_tag_id ORDER BY popularity DESC LIMIT 5

If I try changing the ":group" clause in meta_tags.rb as follows:

-      :group => "taggings.meta_tag_id",
+      :group => "meta_tags.id, meta_tags.name",

then I get:

  "1 page is tagged with tag1
   1 page is tagged with tag2"

which is a little more verbose than I think a tag cloud oughta be :)

I'm not good enough with SQL to know what the right query is; can anyone lend a hand?

Jay Levitt
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant

Reply via email to