Defect #2660

Cannot modify/delete project named "Documents"

Added by Kit Grose over 8 years ago. Updated almost 8 years ago.

Status:ClosedStart date:2009-02-04
Priority:NormalDue date:
Assignee:Eric Davis% Done:

100%

Category:Projects
Target version:0.9.0
Resolution:Wont fix Affected version:0.7.3

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

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

History

#1 Updated by Austen Ito over 8 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

#2 Updated by Austen Ito over 8 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

#3 Updated by Eric Davis over 8 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?

#4 Updated by Austen Ito over 8 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

#5 Updated by Jean-Philippe Lang over 8 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?

#6 Updated by Eric Davis over 8 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).

#7 Updated by Kit Grose over 8 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!

#8 Updated by Eric Davis almost 8 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.

Also available in: Atom PDF