- changed status to resolved
Duplicated id values in inline codes for composite fragment in PHP filter
Original [issue 205](https://code.google.com/p/okapi/issues/detail?id=205) created by @ysavourel on 2012-01-24T13:23:13.000Z:
When we have composite fragment such as:
array(
"activation\_text\_2" => "<ul>".
"<li>xyz® aktivieren. <span class=
"redbold
">»</span> <a href=
"".$\_CONFIG["site"]["default\_page"]."?tpl=new\_xyz
">weiter</a></li>".
"<li>Fund melden. <span class=
"redbold
">»</span> <a href=
"".$\_CONFIG["site"]["default\_page"]."?tpl=found
">weiter</a></li>".
"<li>Im Shop einkaufen. <span class=
"redbold
">»</span> <a href=
"".$\_CONFIG["site"]["default\_page"]."?tpl=onlineshop
">weiter</a></li></ul>"
);
we get:
<ph id="1"><li></ph>xyz® aktivieren. <ph id="2"><span class=
"redbold
"></ph>»<ph id="3"></span></ph> <ph id="4"><a href=
"</ph><ph id="1">".$\_CONFIG["site"]["default\_page"]."</ph><ph id="5">?tpl=new\_xyz
"></ph>weiter<ph id="6"></a></ph><ph id="7"></li></ph><ph id="5">".
"</ph><ph id="8"><li></ph>Fund melden. <ph id="9"><span class=
"redbold
"></ph>»<ph id="10"></span></ph> <ph id="11"><a href=
"</ph><ph id="8">".$\_CONFIG["site"]["default\_page"]."</ph><ph id="12">?tpl=found
"></ph>weiter<ph id="13"></a></ph><ph id="14"></li></ph><ph id="12">".
"</ph><ph id="15"><li></ph>Im Shop einkaufen. <ph id="16"><span class=
"redbold
"></ph>»<ph id="17"></span></ph> <ph id="18"><a href=
"</ph><ph id="15">".$\_CONFIG["site"]["default\_page"]."</ph><ph id="19">?tpl=onlineshop
"></ph>weiter<ph id="20"></a></ph><ph id="21"></li></ph><ph id="22"></ul></ph>
where ph id='1' is duplicated.
Comments (1)
-
Account Deleted - Log in to comment
Comment [1.](https://code.google.com/p/okapi/issues/detail?id=205#c1) originally posted by @ysavourel on 2012-01-25T01:46:13.000Z:
This was related to not checking the id values when using TextFragment.insert(). Now if an id value already exists in the caller fragment, a new one is set. The fix will be in the next snapshot and M16.