Defect #11274

Repository edit link is incorrect when running in a sub-URI

Added by Achim Gaedke over 10 years ago. Updated about 10 years ago.

Status:NewStart date:
Priority:NormalDue date:
Assignee:-% Done:


Category:Project settings
Target version:-
Resolution: Affected version:2.0.3


Hi there!

I'm running a apache2 fastcgi redmine (2.0.3) installation.
It uses the Alias instruction and rewrite rules to get a "sub-URI" installation.

Redmine::Utils::relative_url_root is set and the hack according to is applied.

Everything works fine, except from five links:

Project->Settings->Repositories->Users & Edit & Delete links and
Project->Settings->Issue Categories->Edit & Delete links

Do you have any clue what's wrong?

Thanks & Cheers, Achim

Related issues

Related to Redmine - Defect #11058: Run Redmine in a sub directory results in "No route matches" New
Related to Redmine - Defect #11881: FCGI mode does not support sub-URI Confirmed


#1 Updated by Jean-Philippe Lang over 10 years ago

  • Subject changed from Project->Settings->Repositories->Edit link incorrect to Repository edit link is incorrect when running in a sub-URI

#2 Updated by Jean-Philippe Lang over 10 years ago

Can't see what is wrong with this link. It uses the edit_repository_path method generated by Rails.

#3 Updated by Achim Gaedke over 10 years ago

Thanks for looking into that issue.

The broken link looks like that

I tried to work around these links by adding the sub-uri path
But they just result in a redmine404 error page.

In contrast to that the Project->Settings->Members->edit & delete buttons
work well.

I followed the fastcgi & sub-uri instructions in:

I hope, I've described the set-up precise enough.

in the redmine source code tree, I do a svn diff:

Index: config/routes.rb
--- config/routes.rb    (revision 9889)
+++ config/routes.rb    (working copy)
@@ -16,6 +16,7 @@
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.

 RedmineApp::Application.routes.draw do
+scope "/redmine" do
   root :to => 'welcome#index', :as => 'home'

   match 'login', :to => 'account#login', :as => 'signin'
@@ -332,3 +333,4 @@
Index: config/environment.rb
--- config/environment.rb    (revision 9889)
+++ config/environment.rb    (working copy)
@@ -1,3 +1,4 @@
+ENV['RAILS_ENV'] ||= 'production'
 # Load the rails application
 require File.expand_path('../application', __FILE__)

@@ -12,3 +13,5 @@

 # Initialize the rails application
+Redmine::Utils::relative_url_root = "/redmine" 

Also available in: Atom PDF