
Calendar with PostgreSQL
Reported by Joseph Ridgway | September 17th, 2009 @ 09:46 PM
The calendar doesn't work with PostgreSQL installed.
"count" should be "count(*)" or something. Error below:
ActionView::TemplateError (PGError: ERROR: column "count" does
not exist
LINE 1: ...ection_id = 2) GROUP BY tags.id, tags.name HAVING count
> 0
^
: SELECT tags., COUNT() AS count FROM "tags" INNER JOIN
taggings ON tags.id = taggings.tag_id INNER JOIN contents ON
contents.id = taggings.taggable_id WHERE (taggings.taggable_type =
E'Content' AND section_id = 2) GROUP BY tags.id, tags.name HAVING
count > 0) on line #13 of
vendor/plugins/adva_calendar/app/views/calendar_events/_footer.html.erb:
10:
11:
12: <% end -%>
13: <% if @section.tag_counts.present? -%>
14:
15:
<%= t(:'adva.titles.tags')%>
16:
vendor/plugins/adva_cms/app/models/section.rb:60:in `tag_counts'
vendor/plugins/adva_calendar/app/views/calendar_events/_footer.html.erb:13
vendor/plugins/adva_calendar/app/views/calendar_events/_footer.html.erb:1
vendor/plugins/adva_calendar/app/views/calendar_events/index.html.erb:28
vendor/plugins/adva_calendar/app/controllers/calendar_events_controller.rb:22:in `index'
Comments and changes to this ticket
-
Joseph Ridgway September 17th, 2009 @ 09:49 PM
I fixed it by changing line 51 in from adva/engines/adva_cms/vendor/plugins/simple_taggable/lib/simple_taggable.rb:
group_by = "tags.id, tags.name HAVING count > 0"
to
group_by = "tags.id, tags.name HAVING count(*) > 0"
-
-
Marko Seppä September 18th, 2009 @ 05:39 PM
- State changed from new to resolved
- Assigned user changed from Sven Fuchs to Marko Seppä
Hi Joseph,
thanks for the report and for the patch! I just pushed your patch to adva-cms master.
-- Marko
-
ava james March 24th, 2023 @ 12:03 PM
Nice post thanks for sharing check this. 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>