Code

Opened 9 years ago

Closed 9 years ago

Last modified 8 years ago

#817 closed defect (duplicate)

problem with column-quoting and "computed columns"

Reported by: hugo Owned by: adrian
Component: Metasystem Version:
Severity: normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description (last modified by hugo)

When using the registered comments, an SQL is build that produces the following error:

ProgrammingError at /forum/technik/waschmaschinen/miele-superfix/discussion/
ERROR: column "SELECT COUNT(*) FROM comments_karma WHERE comments_karma.commen" does not exist SELECT "comments"."id","comments"."user_id","comments"."content_type_id","comments"."object_id","comments"."headline","comments"."comment","comments"."rating1","comments"."rating2","comments"."rating3","comments"."rating4","comments"."rating5","comments"."rating6","comments"."rating7","comments"."rating8","comments"."valid_rating","comments"."submit_date","comments"."is_public","comments"."ip_address","comments"."is_removed","comments"."site_id","auth_users"."id","auth_users"."username","auth_users"."first_name","auth_users"."last_name","auth_users"."email","auth_users"."password_md5","auth_users"."is_staff","auth_users"."is_active","auth_users"."is_superuser","auth_users"."last_login","auth_users"."date_joined","content_types"."id","content_types"."name","content_types"."package","content_types"."python_module_name","packages"."label","packages"."name","sites"."id","sites"."domain","sites"."name",("SELECT COUNT(*) FROM comments_karma WHERE comments_karma.comment_id=comments.id AND score=1") AS "_karma_total_good",("SELECT COUNT(*) FROM comments_karma WHERE comments_karma.comment_id=comments.id AND score=-1") AS "_karma_total_bad" FROM "comments","content_types" "t1","content_types" "t5","auth_users","content_types","packages","sites" WHERE "comments"."content_type_id" = "t1"."id" AND "comments"."content_type_id" = "t5"."id" AND "t1"."package" = 'forum' AND "comments"."site_id" = 1 AND "comments"."object_id" = 3 AND "t5"."python_module_name" = 'groups' AND "comments"."user_id" = "auth_users"."id" AND "comments"."content_type_id" = "content_types"."id" AND "content_types"."package" = "packages"."label" AND "comments"."site_id" = "sites"."id" ORDER BY "comments"."submit_date" ASC

This looks like there is column-quoting even done on computed columns like inner selects.

Attachments (0)

Change History (2)

comment:1 Changed 9 years ago by hugo

  • Description modified (diff)

comment:2 Changed 9 years ago by rjwittams

  • Component changed from Admin interface to Metasystem
  • Resolution set to duplicate
  • Status changed from new to closed

Same as #815

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.