Actions
Defect #19024
closedlink_to in Redmine::Hook::ViewListener omits url root
Start date:
Due date:
% Done:
0%
Estimated time:
Resolution:
Fixed
Affected version:
Description
Linking to a controller action omits the configured url root (RAILS_RELATIVE_URL_ROOT
environment variable).
For example, put the following code in a plugin & set RAILS_RELATIVE_URL_ROOT=/redmine
:
link_to "Test", { :controller => 'my', :action => 'plugin' } # => <a href="/my/plugin">Test</a> # Should be: href="/redmine/my/plugin"
There are quite a few others that seem to have the same problem:
https://github.com/peelman/my_projects/issues/5
https://stackoverflow.com/questions/25315103/link-to-omits-redmine-root
I am not sure if this is only reproducible under specific environments (at least the my_projects author doesn't seem to have this problem); I tried both the Bitnami Installer on Windows and the sameersbn/redmine
Docker container. You should get the same results with the following steps:
- Download https://github.com/peelman/my_projects
- On Windows: Install Redmine using Bitnami and put the plugin in the plugins folder
On Linux: Install Docker & fig, put this in the addon folder and typefig up
. - Open Redmine, create a project and go to the
Home
page. - Observe that all links generated by the plugin don't include the relative URL.
Actions