Topic on Project:Support desk

WikiText editor removing line breaks when editing

7
Quinnj09 (talkcontribs)

I have a wiki page that is generated from the following:

{{Table3ColumnHeader|A|B|C}}
{{Table3ColumnRow|1|2|3}}
{{Table3ColumnRow|78|32|53}}
{{Table3ColumnRow|T1|G2|3J}}

and this loads my table fine using the templates, but when I then edit my page, wikitext changes it to the following and if saved without reverting back to the above format, the table does not display correctly:

{{Table3ColumnHeader|A|B|C}} {{Table3ColumnRow|1|2|3}} {{Table3ColumnRow|78|32|53}} {{Table3ColumnRow|T1|G2|3J}}

Why does wikitext editor keep reformatting it and how can I stop it from doing this or fix it?

Please note my wiki version is currently: 1.16.0

1Roso (talkcontribs)

Have you tried WYSIWYG CKEditor extension?

Quinnj09 (talkcontribs)

I am unable to install extensions onto our wiki unfortunately

1Roso (talkcontribs)

I'm just in a middle of upgrade from 1.26.3 to 1.28, will try afterwards your table issue.

1Roso (talkcontribs)

Hmmm, now running 1.28 MWiki, but in your code a loop is being detected:

Template loop detected: Template:Table3ColumnHeader Template:Table3ColumnRow Template:Table3ColumnRow Template:Table3ColumnRow Template:Table3ColumnRow Template:Table3ColumnRow Template:Table3ColumnRow

But I'm not familiar with templates yet, can't help you here much....

Here they say you need to have "|" signs between the table commands... e.g.:

Quinnj09 (talkcontribs)

Template:Table3ColumnHeader is:

{| style="border-left: 2px solid black; border-bottom: 2px solid black; border-right: 2px solid black; border-top: 2px solid black; text-align: center; border-spacing: 0px; margin: 1em auto"
|-
! style="border: 1px solid black; background: lightblue; padding: 5px;" | {{{1}}} 
! style="border: 1px solid black; background: lightblue; padding: 5px;" | {{{2}}} 
! style="border: 1px solid black; background: lightblue; padding: 5px;" | {{{3}}}

and Template:Table3ColumnRow is:

|- 
| style="border: 1px solid black;" | {{{1}}} 
| style="border: 1px solid black;" | {{{2}}} 
| style="border: 1px solid black;" | {{{3}}}

If thats of any help to you?

Quinnj09 (talkcontribs)

I have fixed it by adding

<includeonly>

at the start of each template page and:

</includeonly>

at the end of each template page