Defect #11274

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

Added by Achim Gaedke over 7 years ago. Updated over 7 years ago.

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

0%

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

Description

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
http://www.redmine.org/issues/11058 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

History

#1 Updated by Jean-Philippe Lang over 7 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 7 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 7 years ago

Thanks for looking into that issue.

The broken link looks like that
https://server.ac.nz/repositories/1/committers

I tried to work around these links by adding the sub-uri path
https://server.ac.nz/redmine/repositories/1/committers
https://server.ac.nz/redmine/projects/myproject/repositories/1/committers
But they just result in a redmine404 error page.

In contrast to that the Project->Settings->Members->edit & delete buttons
https://server.ac.nz/redmine/projects/myproject/settings#
work well.

I followed the fastcgi & sub-uri instructions in:
http://www.redmine.org/projects/redmine/wiki/HowTo_configure_Apache_to_run_Redmine

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 @@
     end
   end
 end
+end
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
 RedmineApp::Application.initialize!
+Redmine::Utils::relative_url_root = "/redmine" 
+

Also available in: Atom PDF