Project

General

Profile

Actions

Defect #10254

closed

Issues page links from the menu

Added by Jan Jachacz over 13 years ago. Updated over 13 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Issues
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Cant reproduce
Affected version:

Description

Hi,

I've (almost) set up the Redmine application on my server but i have a little issue about the page "issues".

The link from the menu is:
http://redmine.site.net/issues?project_id=my_project_id
This leads to a page error 500

But it should be:
http://redmine.site.net/projects/my_project_id/issues
Which is working

Same thing happens in the New issue form.

<form action="/issues?project_id=my_project_id" class="tabular new-issue-form" enctype="multipart/form-data" id="issue-form" method="post">...</form>

Which prevents me from creating new bug.

Here is the error log:

Processing IssuesController#index (for XXX.XXX.XXX.XXX at 2012-02-16 13:45:12) [GET]
  Parameters: {"project_id"=>"my_project_id", "action"=>"index", "controller"=>"issues"}
Rendering template within layouts/base
Rendering issues/index

ActionView::TemplateError (new_project_query_url failed to generate from {:controller=>"queries", :action=>"new"} - you may have ambiguous routes, or you may need to supply additional parameters for this route.  content_url has the following required parameters: ["projects", :project_id, "queries", "new"] - are they all satisfied?) on line #41 of app/views/issues/index.html.erb:
38:     <%= link_to_function l(:button_apply), 'submit_query_form("query_form")', :class => 'icon icon-checked' %>
39:     <%= link_to l(:button_clear), { :set_filter => 1, :project_id => @project }, :class => 'icon icon-reload'  %>
40:     <% if @query.new_record? && User.current.allowed_to?(:save_queries, @project, :global => true) %>
41:         <%= link_to_function l(:button_save), "$('query_form').action='#{ @project ? new_project_query_path : new_query_path }'; submit_query_form('query_form')", :class => 'icon icon-save' %>
42:     <% end %>
43:     </p>
44: <% end %>

    (eval):21:in `new_project_query_path'
    app/views/issues/index.html.erb:41
    app/views/issues/index.html.erb:11
    app/controllers/issues_controller.rb:92:in `index'
    app/controllers/issues_controller.rb:91:in `index'
    config/initializers/mongrel.rb:63:in `dispatch_cgi'

Rendering /home/my_user/rails_apps/redmine/public/500.html (500 Internal Server Error)

And finally, here are the versions list:

# RAILS_ENV=production ruby script/about
About your application's environment
Ruby version              1.8.7 (x86_64-linux)
RubyGems version          1.6.2
Rack version              1.1.3
Rails version             2.3.14
Active Record version     2.3.14
Active Resource version   2.3.14
Action Mailer version     2.3.14
Active Support version    2.3.14
Edge Rails revision       unknown
Application root          /home/my_user/rails_apps/redmine
Environment               production
Database adapter          mysql
Database schema version   20110902000000

If anyone can point me in a direction to solve this, it will be very appreciated.

Thanks.

Actions #1

Updated by Etienne Massip over 13 years ago

  • Category set to Issues
  • Status changed from New to Confirmed
  • Target version set to Candidate for next minor release

I thought nobody would never hit this one =)

Well, project_id can't be used as a short query param because it's expected to be potentially present in the URL path (i.e. in /projects/<project_id>/issues route).

Try using the long parameter form, that is: /issues?set_filter=1&f[]=project_id&op[project_id]=%3D&v[project_id][]=<your_project_id>

It can be fixed by renaming path parameter in routes.rb from "project_id" to anything else and by handling it in controllers.

Don't know if it's worth it fixing it.

Actions #2

Updated by Jan Jachacz over 13 years ago

Hi and thanks for the reply,

using the long parameter form didn't trigger the error 500 page and worked as expected but the situation is the same way with any project i'm creating. The issues link from the tab menu is not well generated.

eg: /issues?project_id=projtest

I looking for a place to change the generated link in the menu to change it to /projects/projtest/issues.

Thank you

Actions #3

Updated by Etienne Massip over 13 years ago

Hum...the issue I was talking about is not yours, yours is probably due to a plugin.

Try to restart Redmine with no plugin installed.

Actions #4

Updated by Jean-Philippe Lang over 13 years ago

  • Target version deleted (Candidate for next minor release)
  • Resolution set to Cant reproduce

Something like http://redmine.site.net/issues?project_id=my_project_id returns a 500 error indeed.
But this link should not be present in the menu. Did you change anything to config/routes.rb?

Actions #5

Updated by Jean-Philippe Lang over 13 years ago

  • Status changed from Confirmed to New
Actions #6

Updated by Jean-Philippe Lang over 13 years ago

The 500 error is fixed in r8892.
But still, you should not have these links everywhere. Something is wrong with your routes.

Actions #7

Updated by manish tiwari over 13 years ago

  • Status changed from New to Resolved
  • Assignee set to Anonymous

issues is fixed proparly

Actions #8

Updated by Etienne Massip over 13 years ago

  • Assignee deleted (Anonymous)
Actions #9

Updated by Etienne Massip over 13 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF