Jay Levitt wrote:
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
aaand, the answer is:
1. My wild guess at SQL was right; the :group should be
- :group => "taggings.meta_tag_id",
+ :group => "meta_tags.id, meta_tags.name",
2. The "1 page is tagged with tag1" was because I hadn't read the help docs,
and so I hadn't included tags.css in my page.
3. But that CSS is buggy anyway (at least on Firefox 3 Mac); it seems a
better way to hide the unstyled list is:
- .tag_cloud span { position: absolute; left: -999px; width: 990px; }
+ .tag_cloud span { position: absolute; left: 0px; top: -500px; width: 1px;
height: 1px; overflow: hidden; }
4. I have NO idea what I'm doing with git yet, but (thanks to Edmund's link
to the tutorials), I think I just created a fork, which includes everyone
else's changes to date, at:
http://github.com/jaylevitt/radiant-tags-extension.git
5. I also think I sent a pull request to everyone else. Hope that's the
right thing to do.
6. If all the power goes out somewhere, let me know. It could possibly be
my fault, but I'm pretty sure I canceled that in time.
Jay
_______________________________________________
Radiant mailing list
Post: [email protected]
Search: http://radiantcms.org/mailing-list/search/
Site: http://lists.radiantcms.org/mailman/listinfo/radiant