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
  • #6539

Closed
Open
Created Mar 16, 2014 by Administrator@rootOwner

Error 500 when creating an issue on empty repository

Created by: rtripault

(on GitLab 6.7.0.pre b33d08d) On an empty project without git repository, a 500 error is thrown when trying to create a new issue.

Started GET "/namespace/project/issues/new?issue%5Bassignee_id%5D=&issue%5Bmilestone_id%5D=" for 88.163.220.226 at 2014-03-16 10:21:41 +0100
Processing by Projects::IssuesController#new as HTML
Parameters: {"issue"=>{"assignee_id"=>"", "milestone_id"=>""}, "project_id"=>"namespace/project"}
Rendered projects/issues/_form.html.haml (9.5ms)
Rendered projects/issues/new.html.haml within layouts/projects (9.9ms)
Completed 500 Internal Server Error in 52ms
ActionView::Template::Error (undefined method `sha' for nil:NilClass):
1: %div.issue-form-holder
2: %h3.page-title= @issue.new_record? ? "New Issue" : "Edit Issue ##{@issue.iid}"
3: %hr
4: - if @repository.contribution_guide && [email protected]?
5: - contribution_guide_url = project_blob_path(@project, tree_join(@repository.root_ref, @repository.contribution_guide.name))
6: .alert.alert-info.col-sm-10.col-sm-offset-2
7: ="Please review the <strong>#{link_to "guidelines for contribution", contribution_guide_url}</strong> to this repository.".html_safe
app/models/repository.rb:183:in `tree'
app/models/repository.rb:173:in `block in contribution_guide'
app/models/repository.rb:172:in `contribution_guide'
app/views/projects/issues/_form.html.haml:4:in `_app_views_projects_issues__form_html_haml___1095712195377648899_70156347622760'
app/views/projects/issues/new.html.haml:1:in `_app_views_projects_issues_new_html_haml___4498128122743303932_70156347577760'
app/controllers/projects/issues_controller.rb:46:in `new'
app/controllers/application_controller.rb:58:in `set_current_user_for_thread'

Creating a "dummy" repository fixed the problem

Assignee
Assign to
Time tracking