Page MenuHomePhabricator

An extra blank line added below when editing a paragraph
Closed, DuplicatePublic

Assigned To
None
Authored By
Inaki-LL
Jan 2 2019, 9:06 PM
Referenced Files
F28988378: image.png
May 9 2019, 8:08 PM
F28988351: image.png
May 9 2019, 8:08 PM
F28955420: image.png
May 7 2019, 4:01 PM
F28951074: Proba 2.PNG
May 7 2019, 7:40 AM
F28951072: Proba 1.PNG
May 7 2019, 7:40 AM
F28951073: Proba 3.PNG
May 7 2019, 7:40 AM

Description

Hi, when I edit with Visual Editor ("Ikusizko Editorea") on the Basque Wikipedia I often find that an extra blank line is added automatically after I click on an article's Edit ("aldatu") tab or, more often, after I have edited a paragraph in an article. An extra blank line is added right below the paragraph I edited.

I am using Firefox Quantum and Windows 7.

Go the article Vox (alderdi politikoa)

Click on the edit tab for the section Euskal Herriarekiko jarrera

An extra blank line may have been added by now under the first paragraph (possibly also after the second).

Now edit the first paragraph of the section and Publish the changes by clicking on the blue button "Aldaketak argitaratu..."

Now a new blank line has been added under the paragraph edited (first paragraph of the section).

Thank you for the help!

Event Timeline

Inaki-LL changed the task status from Open to Stalled.Jan 20 2019, 12:11 PM
valhallasw changed the task status from Stalled to Open.Jan 20 2019, 3:58 PM
valhallasw edited projects, added VisualEditor; removed Wikibugs.
valhallasw subscribed.

Hi @Inaki-LL , thank you for reporting this. I'm moving this task to the VisualEditor project; I think the maintainers of that project should be able to determine whether this is expected and if not, what can be done about it.

Thanks @valhallasw, I did not realize there was a VisualEditor project, so glad to see it is moving to the right place. Hopefully this will go faster now ;)

I can't reproduce this problem, or perhaps I'm not understanding what the problem is. (The article has changed since you reported this, which doesn't help.)

Can you clarify and add some screenshots pointing out the extra blank lines? Is that only a temporary visual problem, or are there extra blank lines in the resulting wikitext?

Hi @matmarex, yes, the article has changed, and I cannot reproduce it now. The bug was consistent enough, but now it did not work, it does not show. It has happened in other articles I am working now, like here, but it is erratic, and I cannot reproduce it right now. Will try again at night, and fingers crossed I will be able to do it. Thanks

@matmarex

  1. Go to the article Foruen amaiera Hego Euskal Herrian and section Testuingurua, here
  1. Clik on "Testuingurua" ("aldatu", i.e. Visual Editor)
  2. Copy " Aldi berean, Euskal Herriko burdinolak ez ziren gai Europako burdingintzarekin lehiatzeko. " (for example) and paste it at the end of the second paragraph.
  3. Go to blue botton "Aldaketak argitaratu" and publish the changes.

After saving, a blank line has appeared below the written line added. Hope this helps, thank you! (See also the captures I have attached

  1. Section before editing
    Proba 1.PNG (363×1 px, 154 KB)
  1. Sentence added at the end of 2nd paragraph
    Proba 2.PNG (369×1 px, 133 KB)
  1. Published changes, with parasitic blank line added
    Proba 3.PNG (390×1 px, 154 KB)

Thanks, I can reproduce that. There are indeed multiple empty lines in the generated wikitext as well:

image.png (980×1 px, 353 KB)

VE sends the following HTML to Parsoid for the affected paragraph:

<p><a href="./Frantziako_Iraultza_Euskal_Herrian" rel="mw:WikiLink" title="Frantziako Iraultza Euskal Herrian" id="mwJA">Frantziako Iraultzaren</a> lorratzean, <a href="./Konbentzioaren_Gerra_Euskal_Herrian" rel="mw:WikiLink" title="Konbentzioaren Gerra Euskal Herrian" id="mwJQ">Konbentzioaren Gerra</a> piztu zen; <a href="./Iberiar_Penintsulako_Gerra_Euskal_Herrian" rel="mw:WikiLink" title="Iberiar Penintsulako Gerra Euskal Herrian" id="mwJg">Iberiar Penintsulako Gerrak</a> jarraitu zion, eta <a href="./San_Luisen_Ehun_Mila_Semeak" rel="mw:WikiLink" title="San Luisen Ehun Mila Semeak" id="mwJw">San Luisen Ehun Mila Semeak</a> <a href="./1823" rel="mw:WikiLink" title="1823" id="mwKA">1823</a>an. Aztoramendu horrek sakonetik astindu zituen Euskal Herriko bertako egitura politikoak, gizartea eta ekonomia. Gainera, <a href="./Espainiako_historia" rel="mw:WikiLink" title="Espainiako historia" id="mwKg">Espainietako Koroaren</a> diruzaintza hondoa jota zegoen. Monarkiak diru sarreren premia larria zuen, baita <a href="./Soldadutza" rel="mw:WikiLink" title="Soldadutza" id="mwKw">zerbitzu militarrerako</a> soldaduena ere. Aldi berean, Euskal Herriko burdinolak ez ziren gai Europako burdingintzarekin lehiatzeko.</p><span typeof="mw:Nowiki" id="mwKQ"></span><p id="mwLA"><a href="./Fernando_VII.a" rel="mw:WikiLink" title="Fernando VII.a" id="mwLQ" class="mw-redirect">Fernando VII.a</a> espainiar Borboi erregea, <a href="./Antzinako_Erregimenaren_krisia" rel="mw:WikiLink" title="Antzinako Erregimenaren krisia" id="mwLg">Antzinako Erregimenaren</a> jarraipenaren aldekoa, 1814an itzuli zen tronura, baina espainiar zentralizazioa ez zen eten. 1829an, <a href="./Nafarroako_Erresuma" rel="mw:WikiLink" title="Nafarroako Erresuma" id="mwLw">Nafarroako Erresumako</a> parlamentu jurisdikzionala, <a href="./Nafarroako_Gorteak" rel="mw:WikiLink" title="Nafarroako Gorteak" id="mwMA">Gorteak</a>, biltzeko deia egin zen, historian azkeneko aldiz; Erresumako Aldundia, berriz, 1836ko irailaren 6an bildu zen azkenekoz.<sup about="#mwt7" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw="{&quot;name&quot;:&quot;ref&quot;,&quot;attrs&quot;:{},&quot;body&quot;:{&quot;id&quot;:&quot;mw-reference-text-cite_note-1&quot;}}"><a href="./Foruen_amaiera_Hego_Euskal_Herrian#cite_note-1" style="counter-reset: mw-Ref 1;"><span class="mw-reflink-text">[1]</span></a></sup> 1833ko urrian, Fernando VII.a hil zen, eta tronuko ondorengotzari buruzko gatazka piztu zen, aukerak bi zirela: haren alaba <a href="./Elisabet_II.a_Borboikoa_(Espainia)" rel="mw:WikiLink" title="Elisabet II.a Borboikoa (Espainia)" id="mwMQ">Elisabet II.a</a>, <a href="./Maria_Kristina_Borboikoa" rel="mw:WikiLink" title="Maria Kristina Borboikoa" id="mwMg">Maria Kristina Bi Sizilietakoa</a> erreginordeak ordezkatua, ala <a href="./Karlos_Maria_Isidro_Borboikoa" rel="mw:WikiLink" title="Karlos Maria Isidro Borboikoa" id="mwMw">Karlos Maria Isidro Borboikoa</a>, hildakoaren anaia. </p>

The problem is caused by this bit:

...</p><span typeof="mw:Nowiki" id="mwKQ"></span><p id="mwLA">...

For some reason VE emits a <nowiki/> marker between the two paragraphs. This might be a VE bug? Then Parsoid apparently turns that into a new paragraph, and then removes the useless <nowiki/> marker, leaving an empty paragraph between the two real ones. This might be a Parsoid bug too?

From my little knowledge on coding, from experience I can say that I often see ghostly <nowiki/> codes appearing next to links.

In this case the <nowiki/> is intentional, from wikitext like [[1823]]<nowiki/>an. But it ends up in the wrong place after this paragraph is edited.

I just found that we already have a task for this issue!

Specifically: writing [[1823]]<nowiki/>an instead of [[1823]]an results in the an suffix not being included in the link. I don't speak the language but I assume this to be intentional.

The only thing intentional is the case suffix added. Then, after publishing the changes, the <nowiki/> code appears, I have written no code if I understand you right.

@matmarex I guess you are dealing with the matter. For another clue, regardless of nowiki codes, I opened now the article Foruen amaiera Hego Euskal Herrian by clicking on "aldatu" (Visual Editor), and after loading it adds a parasitic blank line below the first paragraph in the article. Thanks

In this case the <nowiki/> is intentional, from wikitext like [[1823]]<nowiki/>an. But it ends up in the wrong place after this paragraph is edited.

The only thing intentional is the case suffix added. Then, after publishing the changes, the <nowiki/> code appears, I have written no code if I understand you right.

Yes, sorry if I was unclear. Let me try to explain better:

As I understand, you want to achieve this: image.png (19×48 px, 817 B) – where "1823" is a link, and "an" is not, and there is no space between them.

In visual editor, that's easy, but in wikitext, the only way to do it is to write [[1823]]<nowiki/>an. Therefore visual editor will also generate this wikitext.

If we generated [[1823]]an in wikitext, that would result in this: image.png (19×48 px, 804 B) – where the entire word "1823an" is a link. This wikitext feature (called "link trail") is usually useful for grammatical suffixes, but in this case, to avoid it, we have to use <nowiki/>.

@matmarex I guess you are dealing with the matter. For another clue, regardless of nowiki codes, I opened now the article Foruen amaiera Hego Euskal Herrian by clicking on "aldatu" (Visual Editor), and after loading it adds a parasitic blank line below the first paragraph in the article. Thanks

(replied at T197990#5171193)