Defect #2660
closedCannot modify/delete project named "Documents"
100%
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
Updated by Austen Ito over 15 years ago
- File documents.diff documents.diff added
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
Updated by Austen Ito over 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
Updated by Eric Davis over 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?
Updated by Austen Ito over 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
Updated by Jean-Philippe Lang over 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?
Updated by Eric Davis over 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).
Updated by Kit Grose over 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!
Updated by Eric Davis almost 15 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.