Project

General

Profile

Actions

Defect #43603

open

Delete link is not shown in the context menu in a sub-URI environment.

Added by Kenta Kumojima about 10 hours ago. Updated about 10 hours ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Issues list
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
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

Actions #1

Updated by Kenta Kumojima about 10 hours 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 ).

Actions

Also available in: Atom PDF