Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • G gitlabhq1
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 21
    • Issues 21
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 12
    • Merge requests 12
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • gpt
  • large_projects
  • gitlabhq1
  • Issues
  • #2659

Closed
Open
Created Jan 18, 2013 by Administrator@rootOwner

Error with GroupBy on PostgreSQL under Wiki > Pages

Created by: grmartin

I am getting the following error:

Completed 200 OK in 332ms (Views: 185.6ms | ActiveRecord: 96.4ms)
Started GET "/employee-general/team-wiki/wikis/pages" for 127.0.0.1 at 2013-01-18 21:05:11 +0000
Processing by WikisController#pages as HTML
Parameters: {"project_id"=>"employee-general/team-wiki"}
Rendered wikis/pages.html.haml within layouts/project_resource (21.4ms)
Completed 500 Internal Server Error in 449ms
ActionView::Template::Error (PG::Error: ERROR: column "wikis.id" must appear in the GROUP BY clause or be used in an aggregate function
LINE 1: SELECT "wikis".* FROM "wikis" WHERE "wikis"."project_id" = ...
^
: SELECT "wikis".* FROM "wikis" WHERE "wikis"."project_id" = 16 GROUP BY slug ORDER BY created_at):
7: %th slug
8: %th created by
9: %tbody
10: - @wikis.each_with_index do |wiki_page, i|
11: %tr
12: %td
13: = link_to wiki_page.title, project_wiki_path(@project, wiki_page, old_page_id: wiki_page.id)
app/views/wikis/pages.html.haml:10:in `_app_views_wikis_pages_html_haml__2429827826073301817_29324080'

This is my current environment:

gitlab@sorcerer:~/gitlab$ bundle exec rake gitlab:env:info RAILS_ENV=production

System information
System:     Ubuntu 12.04
Current User:   gitlab
Using RVM:  no
Ruby Version:   1.9.3p327
Gem Version:    1.8.23
Bundler Version:1.2.3
Rake Version:   10.0.1

GitLab information
Version:    4.0.0
Revision:   708a0d4
Directory:  /home/gitlab/gitlab
DB Adapter: postgresql
URL:        http://sorcerer.intrepid.local
HTTP Clone URL: http://sorcerer.intrepid.local/some-project.git
SSH Clone URL:  [email protected]:some-project.git
Using LDAP: no
Using Omniauth: no

Gitolite information
Version:    v3.04-42-g2d29cf7
Admin URI:  gitlabscm@localhost:gitolite-admin
Admin Key:  gitlab
Repositories:   /var/scm/gitlab/repositories/
Hooks:      /var/scm/gitlab/.gitolite/hooks/
Git:        /usr/bin/git
Assignee
Assign to
Time tracking