twg/comfortable-mexican-sofa — Issue #118: PG Error in admin when viewing pages
Author: bradseefeld
Created: 2011-12-28 02:36:24+00:00
State: open

This is with version 1.6.1. Seen immediately after creating site and adding layout. Looks like I cannot load the pages resource because of it. I am using Postgres 9.

````ActionView::Template::Error (PGError: ERROR: operator does not exist: character varying = integer
LINE 1: ...cms_categories" WHERE "cms_categories"."site_id" = 1 AND "c...
^
HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts.
: SELECT COUNT(*) FROM "cms_categories" WHERE "cms_categories"."site_id" = 1 AND "cms_categories"."categorized_type" = 'Cms::Page'):
1: <% object = form.object %>
2: <% if (categories = @site.categories.of_type(object.class.to_s)).present? %>
3: <%= form.simple_field t('.label'), nil, :class => 'categories' do %>
4: <% categories.each do |category| %>
5: <%= hidden_field_tag "#{object.class.to_s.demodulize.downcase}[category_ids][#{category.id}]", 0, :id => nil %>````