Actions
Defect #43603
closedDelete link is missing from the context menu when using a relative URL root
Start date:
Due date:
% Done:
0%
Estimated time:
Resolution:
Fixed
Affected version:
Description
After commit r23938, the Delete link is not displayed in the context menu when running in a sub-URI environment.
An exception is raised by Rails.application.routes.recognize_path.
# app/controllers/context_menus_controller.rb
@back = back_url # "/redmine/issues"
begin
# Recognize the controller and action from the back_url to determine
# which view triggered the context menu.
route = Rails.application.routes.recognize_path(@back) #=> ActionController::RoutingError
Files
Related issues
Updated by Kenta Kumojima 22 days ago
I have attached a patch.
This patch fixes the issue in my environment, where nginx and Passenger are configured as described below.
...
# https://www.phusionpassenger.com/library/deploy/nginx/deploy/ruby/#deploying-an-app-to-a-sub-uri-or-subdirectory
location ~ ^/redmine(/.*|$) {
passenger_enabled on;
passenger_base_uri /redmine;
...
However, it may not work for other sub-URI configurations (e.g. RedmineApp::Application.routes.default_scope = "/redmine" https://www.redmine.org/projects/redmine/wiki/HowTo_Install_Redmine_in_a_sub-URI#Working-variant-Sun-Jun-26-134850-MSK-2016 ).
Updated by Holger Just 21 days ago
- Related to Feature #35616: Remove "Delete" from the context menu for related issues and subtasks added
Updated by Go MAEDA 20 days ago
- Subject changed from Delete link is not shown in the context menu in a sub-URI environment. to Delete link is missing from the context menu when using a relative URL root
- Status changed from Confirmed to Resolved
- Assignee set to Go MAEDA
- Resolution set to Fixed
Committed the patch with slight changes.
Thank you for catching and fixing this issue.
Actions