Project

General

Profile

Actions

Defect #2660

closed

Cannot modify/delete project named "Documents"

Added by Kit Grose about 15 years ago. Updated over 14 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Projects
Target version:
Start date:
2009-02-04
Due date:
% Done:

100%

Estimated time:
Resolution:
Wont fix
Affected version:

Description

We've created a project named "Documents" (identifier: documents) as a subproject of another project.

That project doesn't appear in the "Jump to project" drop-down, but does appear on the Projects page. The URL of the project (/projects/show/documents) triggers a 404, as does any attempt to delete the project from the administration section.

The expected behaviour is that the documents project either works as any other project, or isn't able to be created at all. If the solution is a fix to the latter, please instruct how I might be able to remove the project myself.

Database: MySQL v5.0
Ruby: v1.8.6 (i386-mswin32)
Rails: v2.0.2
OS: Windows Server 2003 Standard x64 Edition SP2


Files

documents.diff (62.7 KB) documents.diff Austen Ito, 2009-02-19 10:47
Actions #1

Updated by Austen Ito about 15 years ago

This patch disables the creation of projects with a 'documents' identifier. The bug is caused by a route with higher precedence routing the request to edit a 'Documents' project to the Documents controller rather than the Projects controller.

From routes.rb:
document_views.connect 'projects/:project_id/documents', :action => 'index'

Rather than fix the routes, I figured it made more sense to disable the creation of projects with a 'Documents' identifier altogether

Actions #2

Updated by Austen Ito about 15 years ago

I forgot to say what branch I'm working off of.

I pulled my changes from the master branch on github: http://github.com/edavis10/redmine/tree/master

Actions #3

Updated by Eric Davis about 15 years ago

It looks like your patch has some unrelated code in it. Could you resubmit it or send me a GitHub pull request with the commits?

Actions #4

Updated by Austen Ito about 15 years ago

Eric Davis wrote:

It looks like your patch has some unrelated code in it. Could you resubmit it or send me a GitHub pull request with the commits?

I've sent you a pull request on github. Let me know if I did anything wrong.

Thanks,
austen

Actions #5

Updated by Jean-Philippe Lang about 15 years ago

I'm able to reproduce with 0.7 and 0.8 stable. But it's fixed in current trunk, maybe as a side effect of the URL changes.
Eric, are you able to reproduce?

Actions #6

Updated by Eric Davis about 15 years ago

  • Status changed from New to 7
  • Assignee set to Eric Davis

I'll take a look at it and see if it's still an issue and if the RESTful urls fixed it. For anyone interested Austen Ito's fork is located at http://github.com/austenito/redmine/tree/defect_2660 (great job naming your branch by the way).

Actions #7

Updated by Kit Grose about 15 years ago

Thanks for your work on this issue. Aside from the fix (which appears to be progressing well), I understand this fix will only solve the issue in the future; can I get instructions on how I might be able to remedy the issue in my live repository (even if it requires manual deletion from the database).

Thanks!

Actions #8

Updated by Eric Davis over 14 years ago

  • Status changed from 7 to Closed
  • Target version set to 0.9.0
  • % Done changed from 0 to 100
  • Resolution set to Wont fix

The RESTful urls fixed this in trunk. I think it would be best to allow a project named "Documents", since with the url changes that project's url doesn't conflict with the documents module anymore.

Actions

Also available in: Atom PDF