[MAGNOLIA-550] mgnlRemoveParameter does not work if first parameter is replaced Created: 17/Sep/05  Updated: 11/Aug/08  Resolved: 11/Aug/08

Status: Closed
Project: Magnolia
Component/s: admininterface
Affects Version/s: 2.1 Final
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Michael Aemisegger Assignee: Jan Haderka
Resolution: Obsolete Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

all


Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:

 Description   

If the first request parameter has to be replaced the funciton returned appended an ampersand instead of a question mark to the URL.

patch for revision 1437 of tagged version /magnolia2.1:

diff -uBbPr originals/magnolia-2.1/src/webapp/admindocroot/js/generic.js patchedForSendingPatches/magnolia-2.1/src/webapp/admindocroot/js/generic.js
— originals/magnolia-2.1/src/webapp/admindocroot/js/generic.js 2005-08-31 11:30:51.000000000 +0200
+++ patchedForSendingPatches/magnolia-2.1/src/webapp/admindocroot/js/generic.js 2005-09-17 16:38:42.000000000 +0200
@@ -193,12 +193,17 @@
if (tmp[1])
{
var paramObj=tmp[1].split("&");
+ var isQuestionMarkAppended = false;

for (var i=0;i<paramObj.length;i++)
{
if (paramObj[i].indexOf(name+"=")!=0)
{

  • if (i==0) newHref+="?";
    + if (!isQuestionMarkAppended)
    + { + newHref+="?"; + isQuestionMarkAppended = true; + }

    else newHref+="&";
    newHref+=paramObj[i];
    }



 Comments   
Comment by Jan Haderka [ 11/Aug/08 ]

Not an issue as of 3.6.1 ... in fact was fixed while ago during refactoring of the script.

Generated at Mon Feb 12 03:18:32 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.