Project

General

Profile

Actions

Defect #43603

closed

Delete link is missing from the context menu when using a relative URL root

Added by Kenta Kumojima 22 days ago. Updated 20 days ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Issues list
Target version:
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

Related to Redmine - Feature #35616: Remove "Delete" from the context menu for related issues and subtasksClosedGo MAEDA

Actions
Actions #1

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 ).

Actions #2

Updated by Holger Just 21 days ago

  • Related to Feature #35616: Remove "Delete" from the context menu for related issues and subtasks added
Actions #3

Updated by Go MAEDA 21 days ago

  • Status changed from New to Confirmed
  • Target version set to 6.1.1
Actions #4

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 #5

Updated by Go MAEDA 20 days ago

  • Status changed from Resolved to Closed

Merged the fix into 6.1-stable branch in r24219.

Actions

Also available in: Atom PDF