• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Design issue Critical Text Editor Error

#1
Hi guys;

I encountered a critical error in text editor. It does not match with each other in the published content and in editor content. This error is usually seen in the content created by the news feeds.

So I come face to face with different BBcodes when editing text.

It is actually something exactly like this;

editor_1.png editor_2.png

What I do for this problem?

XF Version: 1.5.8
 
Last edited:

Mike

XenForo developer
Staff member
#2
Can you show a demonstration post of that here? (Feel free to post in the test forum if you want to try.)

We need to be able to see it in action to attempt to resolve it.
 

Mike

XenForo developer
Staff member
#4
The BB code of the example post is:

Code:
[B]Merhaba arkadaşlar, SCS Software Ekibi tarafından Mid-America Trucking Show 2016 isimli bir haber resmi Blog üzerinden yayınlandı! Bu haber sadece ön bilgi amaçlıdır ve İngilizce versiyondur. Simülasyon Merkezi tarafından, haberin Türkçe Çevirisi yapılarak yakında kullanıcılara sunulacaktır.[/B]

[CENTER][SIZE=5][B][COLOR=#0000ff]İngilizce Versiyon (English Version):[/COLOR][/B][/SIZE][/CENTER]

[B][COLOR=#ff8000]Mid-America Trucking Show 2016[/COLOR][/B]

[B][COLOR=#0000ff][LEFT]We have already made a couple of trips across the Atlantic while working on American Truck Simulator, but it's clear that we'll need to be there more often. There is research to do and business to chase there.

There is a major trucking industry event just around the corner which is an opportunity for both - [URL='http://www.truckingshow.com/']Mid-America Trucking Show[/URL] 2016 is taking place between March 31 and April 2, 2016, in Louisville, Kentucky!

A crew of six members of our team (including our CEO Pavel Sebor) will be there all three days, easy to recognize with the dark T-shirts featuring American Truck Simulator logo, mostly running around at quick pace with cameras in hand. If you plan to visit the show as well and happen to bump into us, make sure to say hi!

[CENTER][URL='https://1.bp.blogspot.com/-KtDGIcnGkiw/VvKTE7ChqWI/AAAAAAAABkM/PFiuQwenDPYsKW1GOsa9tCMBtjBDnFzwQ/s1600/MATS_logo_4C_rgb_reversed.png'][IMG]https://1.bp.blogspot.com/-KtDGIcnGkiw/VvKTE7ChqWI/AAAAAAAABkM/PFiuQwenDPYsKW1GOsa9tCMBtjBDnFzwQ/s320/MATS_logo_4C_rgb_reversed.png[/IMG][/URL][/CENTER][/LEFT]
[IMG]http://feeds.feedburner.com/~r/ScsSoftwaresBlog/~4/4HtO20bV6x4[/IMG][/COLOR][/B]

[B]Blog Yazarı: Piotr Łuciuk[/B]

[B][COLOR=#ff8000]Hatırlatma:[/COLOR][/B] [B]Haberlerin Simülasyon Merkezi tarafından, Türkçe Çevirisi yapılmış versiyonları aşağıdaki bölümlerde yayınlanmaktadır.[/B]
[LIST]
[*][URL='http://www.simulasyonmerkezi.net/forum/ats-guncel-oyun-haberleri.174/'][B]ATS Güncel Oyun Haberleri[/B][/URL]
[*][URL='http://www.simulasyonmerkezi.net/forum/ats-oyun-guncellemeleri-bolumu.175/'][B]ATS Oyun Güncellemeleri Bölümü[/B][/URL]
[*][URL='http://www.simulasyonmerkezi.net/forum/ets-2-guncel-oyun-haberleri-bolumu.77/'][B]ETS 2 Güncel Oyun Haberleri Bölümü[/B][/URL]
[*][B][URL='http://www.simulasyonmerkezi.net/forum/ets-2-oyun-guncellemeleri-bolumu.54/']ETS 2 Oyun Güncellemeleri Bölümü[/URL][/B]
[/LIST]

[CENTER]:sm.net: [SIZE=5][B][COLOR=#b30000]KALİTE TESADÜF DEĞİLDİR[/COLOR][/B][/SIZE] :sm.net:[/CENTER]
I will move this to bugs for analysis.
 

Mike

XenForo developer
Staff member
#5
Unfortunately, I'm not sure this can really be fixed easily. It's caused by a specific order of BB codes (which wouldn't naturally be generated by our editor at least):
Code:
[B][COLOR=#0000ff][LEFT]test here[/LEFT][/COLOR][/B]
This leads to HTML like this being generated:
Code:
<p><b><span style="color: red"><p style="text-align: left">testing</p></span></b></p>
The browser then does some manipulation to this, which causes it to effectively close the span tag (with the color) within the first <p> tag (the left aligned one is shifted to after the first one, rather than a child of it).

With how we currently process BB code into the format needed in the RTE, I don't see a straightforward way of resolving this.

To resolve this, you'll need to remove the bold/color from the feed content (or ensure the feed doesn't have the superfluous text-align: left in it, though I doubt you can control that).
 
#6
@Mike, there is a really critical errors in the text editor.

I want to continue the examples;

Create a content with the following codes

Code:
[B][COLOR=#ff0000]TEST:[/COLOR][/B] [B]Test Content 1
[COLOR=#ff0000]TEST 2:[/COLOR][/B] [B]Test Content 2
[COLOR=#ff0000]TEST 3:[/COLOR][/B] [B]Test Content 3[/B]
The code output from the published content. (Editing button)

Code:
[B][COLOR=#ff0000]TEST:[/COLOR][/B] [B]Test Content 1
[COLOR=#ff0000]TEST 2:[/COLOR][/B] [B]Test Content 2
[COLOR=#ff0000]TEST 3:[/COLOR][/B] [B]Test Content 3[/B]
OR

Create a content with the following codes.

Code:
[B][COLOR=#ff0000]TEST:[/COLOR][/B] [B][COLOR=#b3b300]Test Content 1[/COLOR]
[COLOR=#ff0000]TEST 2:[/COLOR][/B] [B][COLOR=#b3b300]Test Content 2[/COLOR]
[COLOR=#ff0000]TEST 3:[/COLOR][/B] [B][COLOR=#b3b300]Test Content 3[/COLOR][/B]
The code output from the published content. (Editing button)

Code:
[B][COLOR=#ff0000]TEST:[/COLOR][/B] [B][COLOR=#b3b300]Test Content 1[/COLOR]
[COLOR=#ff0000]TEST 2:[/COLOR][/B] [B][COLOR=#b3b300]Test Content 2[/COLOR]
[COLOR=#ff0000]TEST 3:[/COLOR][/B] [B][COLOR=#b3b300]Test Content 3[/COLOR][/B]
These are just a few examples and there are many more of these errors in the text editor.
 

Mike

XenForo developer
Staff member
#10
It's not clear what you're trying to explain. I'm aware of the bold tag "folding" which is intentional and expected (and it's visually equivalent; we do it because of how formatting is done in the RTE).
 

Mike

XenForo developer
Staff member
#12
You've highlighted 2 things here. One is potentially a bug; the other is what I've been explaining is expected.

The BB code being simplified within the code tag is a bug (unrelated to your initial post). The second set of BB code being simplified is expected and intentional.