https://bugzilla.wikimedia.org/show_bug.cgi?id=22037
--- Comment #21 from Sal Quintanilla <[email protected]> 2012-10-01 22:46:49 UTC --- Good-ish news, on further examination, I'm causing the error. The simple patch I described above of removing the '{{' and '}}' from the introtemplate and outrotemplate assignment lines works as-is, allowing arguments to the template. But my template not only took arguments, but also tried to make a table with a variable number of columns. It did so by using an introtemplate like this: {| ! style="background:#efefef;" | {{{col1|}}} {{#ifeq: {{#expr:{{{colCount}}} > 1}} | 1 | <div style="display:none">{{</div><nowiki /> ! style="background:#efefef;" | {{{col2|}}}<div style="display:none">}}</div>}}{{#ifeq: {{#expr:{{{colCount}}} > 2}} | 1 | <div style="display:none">{{</div><nowiki /> ! style="background:#efefef;" | {{{col3|}}}<div style="display:none">}}</div> }} |- This looks as intended in the original table, but the further results link gets formed with http://localhost/index.php?title=Special:Ask...&introtemplate=%0A%7B%7C%20%20border%3D%221%22%20cellpadding%3D%225%22%20cellspacing%3D%220%22%20class%3D%22wikitable%20sortable%22%0A%21%20style%3D%22background%3A%23efefef%3B%22%20%20%7C%20Project%20%3Cdiv%20id%3D%22col2start%22%20style%3D%22display%3Anone%22%3E%7B%7B%3C%2Fdiv%3E%7FUNIQ159a63d57ad7d99f-nowiki-00000000-QINU%7F%0A%21%20style%3D%22background%3A%23efefef%3B%22%20%20%7C%20Date%3Cdiv%20id%3D%22col2end%22%20style%3D%22display%3Anone%22%3E%7D%7D%3C%2Fdiv%3E%3Cdiv%20id%3D%22col3start%22%20style%3D%22display%3Anone%22%3E%7B%7B%3C%2Fdiv%3E%7FUNIQ159a63d57ad7d99f-nowiki-00000001-QINU%7F%0A%21%20style%3D%22background%3A%23efefef%3B%22%20%20%7C%20Ballpark%3Cdiv%20id%3D%22col3end%22%20style%3D%22display%3Anone%22%3E%7D%7D%3C%2Fdiv%3E%3Cdiv%20%22col4start%22%20style%3D%22display%3Anone%22%3E%7B%7B%3C%2Fdiv%3E%7FUNIQ159a63d57ad7d99f-nowiki-00000002-QINU%7F%0A%21%20style%3D%22background%3A%23efefef%3B%22%20%20%7C%20Estimator%3Cdiv%20id%3D%22col4end%22%20style%3D%22display%3Anone%22%3E%7D%7D%3C%2Fdiv%3E%3Cdiv%20style%3D%22display%3Anone%22%3E%7B%7B%3C%2Fdiv%3E%7FUNIQ159a63d57ad7d99f-nowiki-00000003-QINU%7F%0A... which does not get parsed like it's supposed and causes the UNIQ...QINU labels to display. I'm going to ask on the list if anyone has gotten if-tests to work with further results, but as far as this goes, the patch below at least gives introtemplate / outrotemplate argument support, iff this syntax is used: |introtemplate={{intemplate |arg1=arg1 |arg2=arg2}} |outrotemplate={{outtemplate}} Index: SMW_QP_List.php =================================================================== --- SMW_QP_List.php (revision 259) +++ SMW_QP_List.php (working copy) @@ -98,7 +98,7 @@ $rows_in_cur_column = 0; } if ( $this->mIntroTemplate != '' ) { - $result .= "{{" . $this->mIntroTemplate . "}}"; + $result .= $this->mIntroTemplate; } // Now print each row @@ -169,7 +169,7 @@ $result .= $rowend; } if ( $this->mOutroTemplate != '' ) { - $result .= "{{" . $this->mOutroTemplate . "}}"; + $result .= $this->mOutroTemplate; } // Make label for finding further results -- Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug. _______________________________________________ Wikibugs-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
