News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Modifying posts adds formatting

Started by Julius_2000, December 27, 2022, 05:57:29 PM

Previous topic - Next topic

Julius_2000

Hi all, hope you had wonderful holidays.

I've got a weird bug/issue regarding modifying a specific post. We are a forum about a music band and so we keep track of dates for concerts etc. So I started using BBCode tables for each month that have some kind of formatting like font sizes, colors and the like. But lately I noticed that when I want to modify my post in order to add new concert dates (either by using "modify" or "add event"), SMF would add formatting to table cells starting about halfway through the post. The first quarter to half of the post is correctly formatted and then formatting like font sizes or color is added/copied to other cells of the table as well.

To rule out that this is solely the fault of our theme, I tested it on here in the test board topic. But apparently, the behavior is the same. SMF adds additional spaces between tables, inserts font size or color formatting from prior table cells to others.
I backed up a version of the original post and when I re-insert that into the post editor and save it, the content shows just fine.

When I start to edit a post using "quick edit", though, instead of "modify", the original formatting is untouched and shown as written.

For now I was only able to observe this for this specific post containig formatted tables. Regular plain text is unaltered when accessed via "modify" as it's supposed to be.

Diego Andrés

I'm inclined to consider it a minor bug, I've seen this happen on this site too, unintended spaces appearing out of nowhere when using the full 'modify' option and having BBC's.

SMF Tricks - Free & Premium Responsive Themes for SMF.

Julius_2000

Thanks for your reply.
What I can observe as well is that you can actually see the change happening. Before the editor is fully loaded, you briefly see a version similar to the "quick edit" one (what I'd like to get). Then when the editor is loaded, the formatting changes

Unfortunately, my test board post is already deletd so here's my post's code:
[center][b][size=16pt][color=#3D3D3D]March[/color][/size][/b][/center]
[hr]
[table]
[tr]
[td][img width=30]https://upload.wikimedia.org/wikipedia/commons/2/21/Flag_of_Colombia.svg[/img][/td]
[td][b]2023/03/23-26 - Colombia ➣ Festival Estéreo Picnic[/color][/b][/td]
[/tr]
[tr]
[td][img width=16]https://cdn-icons-png.flaticon.com/128/3914/3914072.png[/img][/td]
[td][color=red]tba[/color][/td]
[/tr]
[tr]
[td][img width=16]https://cdn-icons-png.flaticon.com/128/5074/5074643.png[/img][/td]
[td]https://www.festivalestereopicnic.com/[/td]
[/tr]
[tr]
[td][img width=16]https://cdn-icons-png.flaticon.com/128/3916/3916598.png[/img][/td]
[td]https://www.entradasamarillas.com/event/festival-estreo-picnic-2023[/td]
[/tr]
[/table]

[center][b][size=16pt][color=#3D3D3D]May[/color][/size][/b][/center]
[hr]
[table]
[tr]
[td][img width=30]https://upload.wikimedia.org/wikipedia/commons/9/9a/Flag_of_Spain.svg[/img][/td]
[td][b][color=red]2023/05/20*[/color] - Spain, Mallorca ➣ Mallorca Live Festival [color=red](* date to be determined)[/color][/b][/td]
[/tr]
[tr]
[td][img width=16]https://cdn-icons-png.flaticon.com/128/3914/3914072.png[/img][/td]
[td]tba[/td]
[/tr]
[tr]
[td][img width=16]https://cdn-icons-png.flaticon.com/128/5074/5074643.png[/img][/td]
[td]https://mallorcalivemusic.com/en/festival/[/td]
[/tr]
[tr]
[td][img width=16]https://cdn-icons-png.flaticon.com/128/3916/3916598.png[/img][/td]
[td]https://mallorcalivemusic.com/en/tickets/[/td]
[/tr]
[/table]

[center][b][size=16pt][color=#3D3D3D]June[/color][/b][/center]
[hr]
[table]
[tr]
[td][img width=30]https://upload.wikimedia.org/wikipedia/commons/1/12/Flag_of_Poland.svg[/img][/td]
[td][b][color=red]2023/06/10* - Poland, Chorzów ➣ FEST Festival (date to be determined)[/color][/b][/td]
[/tr]
[tr]
[td][img width=16]https://cdn-icons-png.flaticon.com/128/3914/3914072.png[/img][/td]
[td]tba[/td]
[/tr]
[tr]
[td][img width=16]https://cdn-icons-png.flaticon.com/128/5074/5074643.png[/img][/td]
[td]https://festfestival.pl/en[/td]
[/tr]
[tr]
[td][img width=16]https://cdn-icons-png.flaticon.com/128/3916/3916598.png[/img][/td]
[td]https://festfestival.pl/en/tickets/[/td]
[/tr]
[/table]

[table]
[tr]
[td][img width=30]https://upload.wikimedia.org/wikipedia/en/a/ae/Flag_of_the_United_Kingdom.svg[/img][/td]
[td][b]2023/06/16 - UK ➣ Isle of White[/b][/td]
[/tr]
[tr]
[td][img width=16]https://cdn-icons-png.flaticon.com/128/3914/3914072.png[/img][/td]
[td]tba[/td]
[/tr]
[tr]
[td][img width=16]https://cdn-icons-png.flaticon.com/128/5074/5074643.png[/img][/td]
[td]https://isleofwightfestival.com/[/td]
[/tr]
[tr]
[td][img width=16]https://cdn-icons-png.flaticon.com/128/3916/3916598.png[/img][/td]
[td]https://isleofwightfestival.com/info/tickets[/td]
[/tr]
[/table]

[table]
[tr]
[td][img width=30]https://upload.wikimedia.org/wikipedia/commons/4/45/Flag_of_Ireland.svg[/img][/td]
[td][b]2023/06/21 - Ireland, Cork ➣ Musgrave Park[/b][/td]
[/tr]
[tr]
[td][img width=16]https://cdn-icons-png.flaticon.com/128/3914/3914072.png[/img][/td]
[td]5:00 pm (Doors open)[/td]
[/tr]
[tr]
[td][img width=16]https://cdn-icons-png.flaticon.com/128/5074/5074643.png[/img][/td]
[td]https://mcd.ie/artists/the-chemical-brothers[/td]
[/tr]
[tr]
[td][img width=16]https://cdn-icons-png.flaticon.com/128/3916/3916598.png[/img][/td]
[td][url="https://www.ticketmaster.ie/the-chemical-brothers-tramore-rd-cork-21-06-2023/event/1800576EBB166593"]https://www.ticketmaster.ie/Chemical_Brothers_Musgrave_Park[/url][/td]
[/tr]
[/table]

[center][b][size=16pt][color=#3D3D3D]July[/color][/size][/b][/center]
[hr]
[table]
[tr]
[td][img width=30]https://upload.wikimedia.org/wikipedia/commons/9/9a/Flag_of_Spain.svg[/img][/td]
[td][b][color=red]2023/07/07*[/color] - Spain, Bilbao ➣ Bilbao BBK Live [color=red](date to be determined)[/color][/b][/td]
[/tr]
[tr]
[td][img width=16]https://cdn-icons-png.flaticon.com/128/3914/3914072.png[/img][/td]
[td]tba[/td]
[/tr]
[tr]
[td][img width=16]https://cdn-icons-png.flaticon.com/128/5074/5074643.png[/img][/td]
[td]https://www.bilbaobbklive.com/en/[/td]
[/tr]
[tr]
[td][img width=16]https://cdn-icons-png.flaticon.com/128/3916/3916598.png[/img][/td]
[td]https://www.bilbaobbklive.com/en/tickets-festival/[/td]
[/tr]
[/table]

[table]
[tr]
[td][img width=25]https://upload.wikimedia.org/wikipedia/en/0/03/Flag_of_Italy.svg[/img][/td]
[td][b]2023/07/08 - Italy, Romano d'Ezzelino ➣ AMA Festival[/b][/td]
[/tr]
[tr]
[td][img width=16]https://cdn-icons-png.flaticon.com/128/3914/3914072.png[/img][/td]
[td]tba[/td]
[/tr]
[tr]
[td][img width=16]https://cdn-icons-png.flaticon.com/128/5074/5074643.png[/img][/td]
[td]https://www.amamusicfestival.com/artisti/[/td]
[/tr]
[tr]
[td][img width=16]https://cdn-icons-png.flaticon.com/128/3916/3916598.png[/img][/td]
[td][url="https://www.ticketone.it/event/the-chemical-brothers-villa-ca-cornaro-16378554/"]https://www.ticketone.it/event/chemical_brothers_AMA-Festival[/url][/td]
[/tr]
[/table]

[table]
[tr]
[td][img width=30]https://upload.wikimedia.org/wikipedia/commons/7/73/Flag_of_Romania.svg[/img][/td]
[td][b][color=red]2023/07/22*[/color] - Romania, Cluj➣ Electric Castle [color=red](date to be determined)[/color][/b][/td]
[/tr]
[tr]
[td][img width=16]https://cdn-icons-png.flaticon.com/128/3914/3914072.png[/img][/td]
[td]tba[/td]
[/tr]
[tr]
[td][img width=16]https://cdn-icons-png.flaticon.com/128/5074/5074643.png[/img][/td]
[td]https://electriccastle.ro/[/td]
[/tr]
[tr]
[td][img width=16]https://cdn-icons-png.flaticon.com/128/3916/3916598.png[/img][/td]
[td]https://electriccastle.ro/tickets[/td]
[/tr]
[/table]

[table]
[tr]
[td][img width=25]https://upload.wikimedia.org/wikipedia/en/0/03/Flag_of_Italy.svg[/img][/td]
[td][b]2023/07/23 - Italy, Lucca ➣ Lucca Summer Festival[/b][/td]
[/tr]
[tr]
[td][img width=16]https://cdn-icons-png.flaticon.com/128/3914/3914072.png[/img][/td]
[td]tba[/td]
[/tr]
[tr]
[td][img width=16]https://cdn-icons-png.flaticon.com/128/5074/5074643.png[/img][/td]
[td]https://www.luccasummerfestival.it/[/td]
[/tr]
[tr]
[td][img width=16]https://cdn-icons-png.flaticon.com/128/3916/3916598.png[/img][/td]
[td]https://www.luccasummerfestival.it/site/tickets[/td]
[/tr]
[/table]

[center][b][size=16pt][color=#3D3D3D]August[/color][/size][/b][/center]
[hr]
[table]
[tr]
[td][img width=30]https://upload.wikimedia.org/wikipedia/en/a/ae/Flag_of_the_United_Kingdom.svg[/img][/td]
[td][b][color=red]2023/08/05*[/color] - UK, Oxfordshire ➣ Wilderness Festival [color=red](*date to be determined)[/color][/b][/td]
[/tr]
[tr]
[td][img width=16]https://cdn-icons-png.flaticon.com/128/3914/3914072.png[/img][/td]
[td]tba[/td]
[/tr]
[tr]
[td][img width=16]https://cdn-icons-png.flaticon.com/128/5074/5074643.png[/img][/td]
[td]https://www.wildernessfestival.com/[/td]
[/tr]
[tr]
[td][img width=16]https://cdn-icons-png.flaticon.com/128/3916/3916598.png[/img][/td]
[td]https://www.wildernessfestival.com/tickets/[/td]
[/tr]
[/table]

[center][b][size=16pt][color=#3D3D3D]September[/color][/size][/b][/center]
[hr]
[table]
[tr]
[td][img width=30]https://upload.wikimedia.org/wikipedia/en/a/ae/Flag_of_the_United_Kingdom.svg[/img][/td]
[td][b]2023/09/23 - UK, Cardiff ➣ Live at Cardiff Bay[/b][/td]
[/tr]
[tr]
[td][img width=16]https://cdn-icons-png.flaticon.com/128/3914/3914072.png[/img][/td]
[td]7:00 pm[/td]
[/tr]
[tr]
[td][img width=16]https://cdn-icons-png.flaticon.com/128/5074/5074643.png[/img][/td]
[td]https://www.bayseries.co.uk/show/the-chemical-brothers-bay/[/td]
[/tr]
[tr]
[td][img width=16]https://cdn-icons-png.flaticon.com/128/3916/3916598.png[/img][/td]
[td][url="https://www.ticketmaster.co.uk/the-chemical-brothers-cardiff-09-09-2023/event/35005D6E80B932DA"]https://www.ticketmaster.co.uk/TheChemicalBrothers-cardiff_tickets[/url][/td]
[/tr]
[/table]

And this is one example showing the last table's changed code

[table][tr][td][size=16pt][img width=30]https://upload.wikimedia.org/wikipedia/en/a/ae/Flag_of_the_United_Kingdom.svg[/img][/size][/td]
[td][size=16pt][b]2023/09/23 - UK, Cardiff ➣ Live at Cardiff Bay[/b][/size][/td]
[/tr]
[tr][td][size=16pt][img width=16]https://cdn-icons-png.flaticon.com/128/3914/3914072.png[/img][/size][/td]
[td][size=16pt]7:00 pm[/size][/td]
[/tr]
[tr][td][size=16pt][img width=16]https://cdn-icons-png.flaticon.com/128/5074/5074643.png[/img][/size][/td]
[td][size=16pt]https://www.bayseries.co.uk/show/the-chemical-brothers-bay/[/size][/td]
[/tr]
[tr][td][size=16pt][img width=16]https://cdn-icons-png.flaticon.com/128/3916/3916598.png[/img][/size][/td]
[td][size=16pt][url="https://www.ticketmaster.co.uk/the-chemical-brothers-cardiff-09-09-2023/event/35005D6E80B932DA"]https://www.ticketmaster.co.uk/TheChemicalBrothers-cardiff_tickets[/url][/size][/td]
[/tr]
[/table]

As you can see, SMF added additional spaces, and also added the font size of 16pt to each table cell where there was none before.

Here's an image comparison
You cannot view this attachment.You cannot view this attachment. 

Advertisement: