column "cms_pagemoderatorstate.id" must appear in the GROUP BY clause

27 views
Skip to first unread message

Dmitrijs Ledkovs

unread,
Feb 24, 2012, 8:46:03 PM2/24/12
to django...@googlegroups.com
Hello,

I've upgraded from Django 1.0.1 to 1.3.1 and from django-cms 2.0.2 to 2.2.

Everything seems to work.

But if I go to:


I get traceback that commit was aborted with the following in my postgresql log.

Any ideas on how to fix this?????

2012-02-25 01:34:38 GMT ERROR:  column "cms_pagemoderatorstate.id" must appear in the GROUP BY clause or be used in an aggregate function at character 8
2012-02-25 01:34:38 GMT STATEMENT:  SELECT "cms_pagemoderatorstate"."id", "cms_pagemoderatorstate"."page_id", "cms_pagemoderatorstate"."user_id", "cms_pagemoderatorstate"."created", "cms_pagemoderatorstate"."action", "cms_pagemoderatorstate"."message" FROM "cms_pagemoderatorstate" INNER JOIN "cms_page" ON ("cms_pagemoderatorstate"."page_id" = "cms_page"."id") INNER JOIN "django_site" ON ("cms_page"."site_id" = "django_site"."id") WHERE "cms_page"."site_id" = 1  GROUP BY (page_id), "django_site"."domain", "cms_page"."tree_id", "cms_page"."lft", "cms_pagemoderatorstate"."action", "cms_pagemoderatorstate"."created" ORDER BY "django_site"."domain" ASC, "cms_page"."tree_id" ASC, "cms_page"."lft" ASC, "cms_pagemoderatorstate"."action" ASC, "cms_pagemoderatorstate"."created" DESC LIMIT 21
2012-02-25 01:34:38 GMT ERROR:  current transaction is aborted, commands ignored until end of transaction block
2012-02-25 01:34:38 GMT STATEMENT:  SELECT "cms_title"."id", "cms_title"."language", "cms_title"."title", "cms_title"."menu_title", "cms_title"."slug", "cms_title"."path", "cms_title"."has_url_overwrite", "cms_title"."application_urls", "cms_title"."redirect", "cms_title"."meta_description", "cms_title"."meta_keywords", "cms_title"."page_title", "cms_title"."page_id", "cms_title"."creation_date" FROM "cms_title" WHERE ("cms_title"."page_id" = 1  AND "cms_title"."language" = 'en-gb' )
2012-02-25 01:34:38 GMT ERROR:  current transaction is aborted, commands ignored until end of transaction block
2012-02-25 01:34:38 GMT STATEMENT:  SELECT "cms_title"."id", "cms_title"."language", "cms_title"."title", "cms_title"."menu_title", "cms_title"."slug", "cms_title"."path", "cms_title"."has_url_overwrite", "cms_title"."application_urls", "cms_title"."redirect", "cms_title"."meta_description", "cms_title"."meta_keywords", "cms_title"."page_title", "cms_title"."page_id", "cms_title"."creation_date" FROM "cms_title" WHERE ("cms_title"."page_id" = 1  AND "cms_title"."language" = 'en-gb' )
2012-02-25 01:34:38 GMT ERROR:  current transaction is aborted, commands ignored until end of transaction block
2012-02-25 01:34:38 GMT STATEMENT:  SELECT "cms_title"."id", "cms_title"."language", "cms_title"."title", "cms_title"."menu_title", "cms_title"."slug", "cms_title"."path", "cms_title"."has_url_overwrite", "cms_title"."application_urls", "cms_title"."redirect", "cms_title"."meta_description", "cms_title"."meta_keywords", "cms_title"."page_title", "cms_title"."page_id", "cms_title"."creation_date" FROM "cms_title" WHERE ("cms_title"."page_id" = 5  AND "cms_title"."language" = 'en-gb' )
2012-02-25 01:34:38 GMT ERROR:  current transaction is aborted, commands ignored until end of transaction block
2012-02-25 01:34:38 GMT STATEMENT:  SELECT "cms_title"."id", "cms_title"."language", "cms_title"."title", "cms_title"."menu_title", "cms_title"."slug", "cms_title"."path", "cms_title"."has_url_overwrite", "cms_title"."application_urls", "cms_title"."redirect", "cms_title"."meta_description", "cms_title"."meta_keywords", "cms_title"."page_title", "cms_title"."page_id", "cms_title"."creation_date" FROM "cms_title" WHERE ("cms_title"."page_id" = 1  AND "cms_title"."language" = 'en-gb' )
2012-02-25 01:34:38 GMT ERROR:  current transaction is aborted, commands ignored until end of transaction block
2012-02-25 01:34:38 GMT STATEMENT:  SELECT "cms_title"."id", "cms_title"."language", "cms_title"."title", "cms_title"."menu_title", "cms_title"."slug", "cms_title"."path", "cms_title"."has_url_overwrite", "cms_title"."application_urls", "cms_title"."redirect", "cms_title"."meta_description", "cms_title"."meta_keywords", "cms_title"."page_title", "cms_title"."page_id", "cms_title"."creation_date" FROM "cms_title" WHERE ("cms_title"."page_id" = 5  AND "cms_title"."language" = 'en-gb' )
2012-02-25 01:34:39 GMT ERROR:  current transaction is aborted, commands ignored until end of transaction block
2012-02-25 01:34:39 GMT STATEMENT:  SAVEPOINT s140166796891904_x1
Reply all
Reply to author
Forward
0 new messages