
has_filter :categorized with PostgreSQL
Reported by Joseph Ridgway | September 18th, 2009 @ 05:16 PM
Filtering articles (or albums etc) by category doesn't work with PostgreSQL installed. PostgreSQL doesn't allow "#{table_name}.id" in the group by clause like MySQL does. Rather, each column must be listed. I've tried fixing this but didn't get far. If I understood the method better I might get further. Any help?
This can be found in vendor/adva/engines/adva_cms/vendor/plugins/has_filter/lib/has_filter/active_record/act_macro.rb.
Error below:
PGError: ERROR: column "contents.site_id" must appear in the
GROUP BY clause or be used in an aggregate function
LINE 1: SELECT contents., COUNT() AS count FROM "contents"
INNER...
^
: SELECT contents., COUNT() AS count FROM "contents" INNER JOIN "categorizations" ON "categorizations".categorizable_id = "contents".id AND "categorizations".categorizable_type = E'Content' INNER JOIN "categories" ON "categories".id = "categorizations".category_id WHERE (((categories.id IN(E'4')) AND ("contents".section_id = 1)) AND ("contents".section_id = 1)) AND ( ("contents"."type" = 'Article' ) ) GROUP BY contents.id HAVING count(*) >= 1 ORDER BY contents.position, contents.id DESC, contents.published_at DESC LIMIT 25 OFFSET 0
Comments and changes to this ticket
-
Marko Seppä November 23rd, 2009 @ 11:36 AM
- Tag set to filtering, postgresql
- State changed from new to open
Hi Joseph,
we are aware that there are still many known problems with PostgreSQL and adva-cms, any contributions are welcome. :)
Thanks for the report,
-- Marko
-
AshleyMcCall May 18th, 2022 @ 08:45 AM
The sharing SQL information is quite wise and updates would be recommended. I hope after the help here the people will be able to fix the problem with their SQL server. Do share more such suggestions on https://collegecures.com/2022/pros-and-cons-of-using-essay-writing-... hope these are beneficial and supportive for everyone.
-
ChristopherBarker July 19th, 2022 @ 09:52 AM
Thanks for the updated website of the UPS company that would be helping. The people who really want the material about online services they should visit the official page. Also, find the other essaygeeks.co.uk reviews blog updates pretty interesting keep posting further updates.
-
Jacob Hue November 28th, 2022 @ 11:16 AM
Your writing is really informative, especially because it's so meaningful and updated. Thanks for sharing this wonderful post!
Your writing is really great. I’m so glad I read it. It kept me hooked the whole way through.
Thanks for this information. I really appreciate the information that you have provided.https://www.myccpay.onl/ https://www.mcd-voicex.com/ https://www.tellpopeyes.org/
-
ava james March 13th, 2023 @ 10:34 AM
Nice ticket thanks for sharing this. I am glad to see it. lightinthebox discount code
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<p>Cutting edge cms, blog, wiki, forum ... plattform.</p>
<p>Find the code on <a href="http://github.com/svenfuchs/adva_cms/tree/master">GitHub: adva cms</a></p>
<p>Part of the business application framework <a href="http://www.advabest.org/">adva best</a>.</p>