Defect #14179
openredmine base url wrong in email when relative_url_root set.
0%
Description
Hello
This report is for git SHA cc23ab9.
I upgraded recently a redmine installation from 1.4 to 2.3.1. We install in a relative_url_root (called /projets) and not in the root of the server.
The first issue I encountered was that
Redmine::Utils::relative_url_root = "/projets"
in the environment.rb config file doesn't work anymore. After digging in the "Issues" collection here on redmine.org, I found some workaround, by adding:
RedmineApp::Application.routes.default_scope = { :path => '/projets' }
in environment.rb.
The report was advising using RedmineApp::Application.routes.default_scope = { :path => '/projets', :shallow_path => '/projets' }
, but the shorter version seems to work too. Pages are displayed correctly, RSS feeds have the right URLs too.
Anyways, no matter what I try, the email notification messages contain the wrong URL: 'http://server.my/projets/projets'. The relative_url_root is repeated.
Please advise.
NOTE: the relative_url_root configuration should be given a prominent and clear explanation in the RedmineInstall document. It is always a pain to figure out. I don't have data to back my next affirmation, but I believe a good portion of redmine installations are done on servers that contain other things apart redmine, thus requiring relative_url_root configurations.
Files
Updated by C Tibirna over 11 years ago
Given my lack of ruby/rails/redmine experience, I had to resolve myself to grepping the sources (to no avail) and digging the internets (with mixed results).
Finally, I fell over http://bitnami.com/forums/forums/redmine/topics/redmine-url-in-e-mail-notification and I realized that my problem might come from that too: the value of "Administration/Configuration/General/Host name and path" config option.
Lo and behold, it turns out I had configured there, from the time of redmine 1.4:
myhost.dom/relative_url
And now, with redmine 2.3, I had to trim it to:
myhost.dom
This means that there is a changed (undocumented) behavior in redmine 2.3, which automatically adds the relative_url to the full value of that config option.
So, I have my workaround, but there remain 2 issues:
- lack of exact documentation about that config option
- not adding relative_url automatically, as it seems to defeat the purpose (is there one?) of that config option.
Thanks.
Updated by Timmy Vercruysse over 8 years ago
- File mail attachment..png mail attachment..png added
- File mail attachment.png mail attachment.png added
I've tried it but i seems like i still have problems with the picture in mails.
The urls to the attachements are good, but the inline picture doesn't come up.
!mail attachment.png!
Does anybody know where to change the url of the inline picture's.