Project

General

Profile

Actions

Defect #14023

closed

Can't delete relation when Redmine runs in a subpath

Added by Ralf S. over 11 years ago. Updated over 11 years ago.

Status:
Closed
Priority:
Normal
Category:
Issues
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed
Affected version:

Description

Brief Description:
  • Since update to V2.3.0, it's not possible to delete a related issue.
  • this worked very well in former versions
Reproduce Hints:
  1. open a Ticket view, go down to 'Related issues' and [Add] an issue
  2. select 'Related to', type another valid ticket no. of same project and [Add] => everything ok!
  3. Now try to [Delete Relation] of that issue in same view
  4. Dialog 'Are you sure?', press [Ok] => relation is still active!
Notes:
  • We tryed a lot, but did not find a workaround for that bug.
  • The bug exists in V2.3.1 too.
  • 'Related Issues' is a powerful feature in Redmine. So we hope, that somebody improves the priority of this defect for next release V2.3.2.
Actions #1

Updated by Jost Baron over 11 years ago

This seems to be a problem triggered by running redmine in a subpath. To make redmine run in the subpath "/redmine", two things were done:

  1. The line Redmine::Utils::relative_url_root = "/redmine" was added as last line of config/environment.rb
  2. The workaround described here was used.

This adds the prefix "/redmine" to all links, but it misses the "Remove relation" link. However, even after adding the prefix, redmine can't route the DELETE-request: ActionController::RoutingError (No route matches [DELETE] "/redmine/relations/123456").

Hope this helps in fixing it.

Actions #2

Updated by Jean-Philippe Lang over 11 years ago

  • Subject changed from Can't delete relation to Can't delete relation when Redmine runs in a subpath
Actions #3

Updated by Jost Baron over 11 years ago

This may be considered as resolved.

The problem was that routes to relations are shallow routes and the variable :shallow_path was not set accordingly. It would be nice if redmine would work in subdirectories again. Using a reverse proxy sadly is no option, because some paths are hardcoded into JS, which makes them hard to adjust.

I've posted an attempt of a solution here, but that is probably not the best way of resolving the issue.

Actions #4

Updated by Jean-Philippe Lang over 11 years ago

According to http://stackoverflow.com/questions/6422677/rails-routes-with-scope-locale-and-shallow-nested-resources, you should be able to specify :shallow_path only once with your scope (not tested):

scope :path => "redmine", :shallow_path => "redmine" do
  ...
end

IIRC, there was no need to change the routes with Rails 2 for running in a suburi.

Actions #5

Updated by Jean-Philippe Lang over 11 years ago

  • Status changed from New to Resolved
  • Assignee set to Jean-Philippe Lang
  • Target version set to 2.3.2
  • Resolution set to Fixed

While using :shallow => true ignores the scope, using a shallow block takes care of it. I'm not sure that it's an expected behaviour from Rails but I've committed the change in r11851. Wrapping the routes in a single scope now generates all routes with that scope properly.

Actions #6

Updated by Jean-Philippe Lang over 11 years ago

  • Status changed from Resolved to Closed

Merged.

Actions

Also available in: Atom PDF