Defect #35

Incorrect links for the Admisitration menu

Added by Mahmoud M'HIRI over 12 years ago. Updated over 12 years ago.

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

0%

Category:-
Target version:-
Resolution: Affected version:

Description

When deploying redmine in my server, all is ok but the administration sub-menus where not working in fact, i'm not deploying
redmine in the root of my server:

www.myserevr.com/dir/subdir/redmine

and all menues are pointing to

www.myserevr.com/dir/subdir/redmine/public/:controller/..

but sub menues of Adminisration are pointing to:

www.myserevr.com/:controller/..

so they are incorrect links, i just modified the app/views/layout/base.rhtml to add my root the DIVs of those sub
menues.

I think that this should be managed by a variable in enviremont.rb or sth like that..

History

#1 Updated by Mahmoud M'HIRI over 12 years ago

It isn't from mailer.rb ( url =
"http://#{Setting.host_name}/") that we extract host
name ?

#2 Updated by Mahmoud M'HIRI over 12 years ago

So what do you say about:

url    = "http://"+request.domain+"/"

instead of:

url = "http://#{Setting.host_name}/"

#3 Updated by Jean-Philippe Lang over 12 years ago

Because request.relative_url_root doesn't give you a host name,
just a path.

#4 Updated by Mahmoud M'HIRI over 12 years ago

But why not to use the same way (request.relative_url_root)
for mail notification instead of asking host_name ?

#5 Updated by Jean-Philippe Lang over 12 years ago

I've fixed the help link (not exactly the way you propose).

Thanks

#6 Updated by Mahmoud M'HIRI over 12 years ago

I think that the same "bug" is till unfixed enven in
the
repository. In fact when clicking the "Help" button
it is
redirecting to "/manual/#{lang}/#{template}" which
do not
include the host path (the problem is raisen only when
redmine is hosted in subdirectories), so if we trust on the
host name given in the settings, we could correct this by
substituting reirection in help_controller.rb by:

if template
link = Setting.host_name
redirect_to
"http://#{Setting.host_name}/manual/#{lang}/#{template}"
;
else
redirect_to
"http://#{Setting.host_name}/manual/#{lang}/index.html"
end

#7 Updated by Jean-Philippe Lang over 12 years ago

In fact, this bug was fixed several weeks ago in the repository.
You can check out the latest source or wait for the next release
to have this fix.

To check out the source (you need the svn binaries):
svn checkout svn://rubyforge.org/var/svn/redmine/trunk

Also available in: Atom PDF