Project

General

Profile

Actions

Defect #6388

closed

New Subproject leads to a 404

Added by Holger Winkelmann over 14 years ago. Updated about 14 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Projects
Target version:
Start date:
2010-09-14
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed
Affected version:

Description

Adding a New SubProject renders a 404.

- Actual trunk r4083
- Postgres 8.4

Actions #2

Updated by Michael Hughes over 14 years ago

Same occurs on my server:

-redmine 1.0.1.devel
-mysql 14.12 Distrib 5.0.75 debian-linux-gnu
-ruby 1.8.7 (2008-08-11 patchlevel 72) [i486-linux]

Actions #3

Updated by Felix Schäfer over 14 years ago

Michael Hughes wrote:

Same occurs on my server:

SubmittingBugs, in this case especially:

the error stack trace that you should find in the log file if your report is about an error. The message displayed by the app (eg. ...An error occurred on the page you were trying to access. If you continue...) is useless here.

Actions #4

Updated by Perrier T over 14 years ago

SubmittingBugs, in this case especially:

the error stack trace that you should find in the log file if your report is about an error. The message displayed by the app (eg. ...An error occurred on the page you were trying to access. If you continue...) is useless here.

I've just updated to 4089 and it looks like this is a real issue.

Processing ProjectsController#show (for 192.168.0.123 at 2010-09-16 13:36:40) [GET]
  Parameters: {"action"=>"show", "id"=>"add", "parent_id"=>"bat", "controller"=>"projects"}
Rendering template within layouts/base
Rendering common/404 (404)
Filter chain halted as [:find_project] rendered_or_redirected.
Completed in 47ms (View: 47, DB: 0) | 404 Not Found [http://192.168.0.149/projects/add?parent_id=bat] 

I hope this is what you mean by log. If anything else could be useful I'll try to post it too.

Actions #5

Updated by Felix Schäfer over 14 years ago

  • Assignee set to Eric Davis
  • Affected version (unused) set to devel

I've spotted the bug, thanks. There's some (somewhat heavy) refactoring going on in the controllers, and some routes change due to that. For the impatient, the hotfix is quite simple:

diff --git a/app/views/projects/show.rhtml b/app/views/projects/show.rhtml
index 0ad9a11..cf3814b 100644
--- a/app/views/projects/show.rhtml
+++ b/app/views/projects/show.rhtml
@@ -1,6 +1,6 @@
 <div class="contextual">
        <% if User.current.allowed_to?(:add_subprojects, @project) %>
-               <%= link_to l(:label_subproject_new), {:controller => 'projects', :action => 'add', :parent_id => @project}, :class => 'icon icon-add' %>
+               <%= link_to l(:label_subproject_new), {:controller => 'projects', :action => 'new', :parent_id => @project}, :class => 'icon icon-add' %>
        <% end %>
 </div>
 

For the git users among you, the commit can be found on github too.

Actions #6

Updated by Eric Davis over 14 years ago

  • Status changed from New to Resolved
  • Target version set to 1.0.2
  • Resolution set to Fixed

Fixed in r4095. Thanks for the patch Felix.

Actions #7

Updated by Eric Davis over 14 years ago

  • Status changed from Resolved to Closed

Merged into 1.0-stable for release in 1.0.2

Actions #8

Updated by Roman aka iTUX about 14 years ago

redmine 1.0.3 - error still remains

Processing ProjectsController#show (for хх.хх.хх.хх at 2010-11-11 17:33:03) [GET]
Parameters: {"action"=>"show", "id"=>"add", "parent_id"=>"documenting", "controller"=>"projects"}
Rendering template within layouts/base
Rendering common/404 (404)
Filter chain halted as [:find_project] rendered_or_redirected.
Completed in 14ms (View: 0, DB: 10) | 404 Not Found [http://redmine/projects/add?parent_id=documenting]

Actions #9

Updated by Gabriel Gomiz about 14 years ago

I can confirm that version 1.0.3 has the error. It is weird because I've checked and the patch is applied... :S

Actions #10

Updated by Felix Schäfer about 14 years ago

Make sure you don't have any plugins installed overriding the view with the old/broken link.

Actions #11

Updated by Charlie Beckett about 14 years ago

I can confirm that the projects tree view plugin (http://www.redmine.org/boards/3/topics/4645) needs a subtle tweak to get this working.

Changing the related apps\index.rhtml file, action from 'add' to 'new' got my system up and running.

Actions

Also available in: Atom PDF