Forum:Extra "p" and "br /" generated from template code

Greetings,

I am working on this template. Viewing the results here reveals some irregularities with the resulting table. Namely the rows are not always the minimum necessary height.

From other articles using the template it seems changing the variables used also alters the affected rows.

The HTML reveals the problem are due to additional  and   being generated. I do not which parts of the template's code are being interpreted to generate these extra tags.

Is anybody aware of any workaround for the problem? Thanks.

- Meco (talk) 04:15, 28 May 2009 (UTC)


 * I got the same problem on two english wikis where i've done work lately.
 * I know (or i think) that it has something to do with the new preprocessor.
 * What i dont understand is that this problem is not on fr.guildwars even tough that it's supposed to be on the same version of Mediawiki.
 * It freaks the hell out of me when i code a template the same way of what we do on fr.guildwars but it doesn't render the same elsewhere on Wikia without any good reason.
 * Now, for the solution, you can look what i had to do on c:roseonline:Template:Item or what i asked a friend from fr.guildwars for little help on c:fractal:Template:Software.
 * I saw many people making use of HTML comments to fix that problem. — TulipVorlax 05:50, 28 May 2009 (UTC)
 * !- This is such a lazy template i preffer to use !- same effect xD.
 * Now im not 100% sure but i may be thinking its because you are not chaining your  eg
 * you are basically doing
 * you are basically doing


 * instead of


 * so they are chain in the same paragraph as the parsefunctions not only removes whitespaces also ads  , tell me if im wrong as this is more of an old habit. --

This is what I do:

This breaks the parsing around the row. – koisuru ( talk ) 17:31, 28 May 2009 (UTC)

Thank you all for your help. After some more tinkering I've settled on something like this: |- It seems this avoids the extra tags. Thanks again! - Meco (talk) 19:18, 28 May 2009 (UTC)
 * just as a note, that in some cases it may not look good if you have there is some configuration to the tr or table rows as they may show. Also i found the page Forum:External_links_and_templates_not_working where are a more clear explanation on why it happends --

Chaining is really not the solution because subsequent data are not supposed to appear only if the first one is there. It really not logical. It defeat the utility of the infobox. — TulipVorlax 23:48, 28 May 2009 (UTC)
 * @Tulip: you mean nesting one #if inside another #if response, if you notice i only putthemalltoguer thats what i mean by chaining one beside the other not inside --
 * So, what you meant is what i had to do when i used ...  elements instead of a table on another infobox on another wiki.
 * It make templates really hard to read. I wish one day the parser would get rid of "white space" like it should. But that is Mediawiki, not Wikia.... — TulipVorlax 06:42, 30 May 2009 (UTC)
 * That i have nothing to say other that i got use to reading that way /me love complex esoteric templates with curious functions, but when there is to much i aid by coping the code to notepad++ and move the active thing (the like flashing pipe) where the { starts and it bolds and puts color red of the } ends that way i know where it starts and where it ends i just have to find the pipes --
 * I use Notepad2 a lot more than notepad++ (yes, i have both). The latter is mainly usefull for two docs or more at the dame time. — TulipVorlax 18:22, 30 May 2009 (UTC)