Defect #6839

Hardcoded absolute links in my/page_layout

Added by Clemens Hammacher about 7 years ago. Updated about 7 years ago.

Status:ClosedStart date:2010-11-05
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Code cleanup/refactoring
Target version:1.0.4
Resolution:Fixed Affected version:1.0.2

Description

Since this bug is independent from any other software versions, I am omitting the usual information.

There are absolute links hardcoded in redmine views, which does not work if redmine is hosted in some subdirectory (e.g. "/redmine").

This is the location I found so far, but I don't know if it's the only one.
In app/views/my/page_layout.rhtml:

        Sortable.create("list-top", {constraint:false, containment:['list-top','list-left','list-right'], dropOnEmpty:true, handle:'handle', onUpdate:function(){new Ajax.Request('/my/order_blocks?group=top', {asynchronous:true, evalScripts:true, parameters:Sortable.serialize("list-top")})}, only:'mypage-box', tag:'div'})
        Sortable.create("list-left", {constraint:false, containment:['list-top','list-left','list-right'], dropOnEmpty:true, handle:'handle', onUpdate:function(){new Ajax.Request('/my/order_blocks?group=left', {asynchronous:true, evalScripts:true, parameters:Sortable.serialize("list-left")})}, only:'mypage-box', tag:'div'})
        Sortable.create("list-right", {constraint:false, containment:['list-top','list-left','list-right'], dropOnEmpty:true, handle:'handle', onUpdate:function(){new Ajax.Request('/my/order_blocks?group=right', {asynchronous:true, evalScripts:true, parameters:Sortable.serialize("list-right")})}, only:'mypage-box', tag:'div'})

They should be replaced by

        Sortable.create("list-top", {constraint:false, containment:['list-top','list-left','list-right'], dropOnEmpty:true, handle:'handle', onUpdate:function(){new Ajax.Request('<%= url_for(:controller => 'my', :action => 'order_blocks', 'group' => 'top') %>', {asynchronous:true, evalScripts:true, parameters:Sortable.serialize("list-top")})}, only:'mypage-box', tag:'div'})
        Sortable.create("list-left", {constraint:false, containment:['list-top','list-left','list-right'], dropOnEmpty:true, handle:'handle', onUpdate:function(){new Ajax.Request('<%= url_for(:controller => 'my', :action => 'order_blocks', 'group' => 'left') %>', {asynchronous:true, evalScripts:true, parameters:Sortable.serialize("list-left")})}, only:'mypage-box', tag:'div'})
        Sortable.create("list-right", {constraint:false, containment:['list-top','list-left','list-right'], dropOnEmpty:true, handle:'handle', onUpdate:function(){new Ajax.Request('<%= url_for(:controller => 'my', :action => 'order_blocks', 'group' => 'right') %>', {asynchronous:true, evalScripts:true, parameters:Sortable.serialize("list-right")})}, only:'mypage-box', tag:'div'})

Associated revisions

Revision 4380
Added by Jean-Philippe Lang about 7 years ago

Removed hardcoded links in my/page_layout (#6839).

History

#1 Updated by Jean-Philippe Lang about 7 years ago

  • Status changed from New to Resolved
  • Target version set to 1.0.4
  • Resolution set to Fixed

Fixed in r4380. Thanks.

#2 Updated by Jean-Philippe Lang about 7 years ago

  • Subject changed from Hardcoded absolute links to Hardcoded absolute links in my/page_layout

#3 Updated by Jean-Philippe Lang about 7 years ago

  • Category set to Code cleanup/refactoring
  • Status changed from Resolved to Closed

Merged in 1.0-stable in r4400.

Also available in: Atom PDF