Jump to content

VisualEditor/Feedback/Archive/2018/11

Add topic
From mediawiki.org
Latest comment: 7 years ago by Whatamidoing (WMF) in topic Ошибки в редакторе. Bugs.

Post your feedback about using the visual editor.

If you have never provided feedback before, you can learn how to do it effectively. If you are reporting a problem directly on this page, please include your web browser, computer operating system, and wiki skin (usually Vector, sometimes Monobook). The feedback tool within the visual editor will include your user agent details instead.

You can use this page to tell the Wikimedia developers your ideas and issues about using the visual editor: this is the only feedback page actively monitored by WMF staff. The Contributors team welcomes your feedback and ideas, especially on user interface decisions and the priorities for adding new features. All comments are read, in any language, but personal replies are not guaranteed: the team will try and go through reports here at least once a week. Need more attention? Report directly in Phabricator. Please note that the Wikimedia Foundation does not provide support for installing VisualEditor on third-party wikis. Please report bugs involving Parsoid at Talk:Parsoid instead.

You may also want to read a guide to optimize the visual editor's experience on your site, which details work necessary on the community side (such as translating or setting up citation systems).

View open developer tasksReport a new bug in PhabricatorJoin the IRC channelTest the visual editor! (no account required)

Suggestion: Reconsider using <nowiki> when wrapping bold or italics

[edit]

Issue:

There seem to be a considerable number of bad uses of markup when an apostrophe is used.

Steps to reproduce:

  1. Go to Sandbox
  2. Type a single apostrophe: '
  3. Select the apostrophe (highlight it)
  4. Set it as bold (Ctrl + B)
  5. Save page

Possible solutions

  1. Always use the html entities for those so it becomes ''''''' ; or
  2. Wrap it around html tags, so instead of '''<nowiki/>'''' it becomes <b>'</b>

Notes:

I came upon these after seeing it in an article and searching for them. There are plenty of ridiculous examples:

https://en.wikipedia.org/w/index.php?title=Kilteel&diff=prev&oldid=616000454

The Archaeological Survey of Ireland notes a 16th or 17th century house in Blackchurch whose site has yet to be identified, presumably the <nowiki/><nowiki/>'<nowiki/>''stump of a castle''<nowiki/>'.<ref>KD015-011</ref> <nowiki/><nowiki/><nowiki/><nowiki/><nowiki/><nowiki/><nowiki/><nowiki/><nowiki/><nowiki/><nowiki/><nowiki/>

https://en.wikipedia.org/w/index.php?title=Belle_%28Beauty_and_the_Beast%29&diff=prev&oldid=837869142

<nowiki/><nowiki/><nowiki/><nowiki/>{{rquote|left|As Disney heroines go, Belle was an iconoclast.

https://en.wikipedia.org/w/index.php?title=Andrzej_Grzegorczyk&diff=prev&oldid=830828900

<nowiki/>''<nowiki/>''<nowiki/>''<nowiki/>'''<nowiki/><nowiki/><nowiki/>'''''

https://it.wikipedia.org/w/index.php?title=HMS_Britannia_%281904%29&diff=prev&oldid=98332054

<nowiki/><nowiki/><nowiki/><nowiki/><nowiki/><nowiki/><nowiki/><nowiki/>''<nowiki/><nowiki/>''

See more: https://en.wikipedia.org/w/index.php?title=Special:Search&limit=500&offset=0&profile=default&search=insource%3A%2F%5C%3Cnowiki%5C%2F%5C%3E%5C%3Cnowiki%5C%2F%5C%3E%2F 197.218.91.29 (talk) 11:08, 1 November 2018 (UTC)Reply

Alternatively, the parser should be smart enough to normalize these nowikis and simply remove all markup(apostrophes) that will result in no content being rendered at all. 197.218.91.29 (talk) 11:19, 1 November 2018 (UTC)Reply
@SSastry (WMF), is any of this covered by your existing collection of nowiki bugs? Whatamidoing (WMF) (talk) 23:24, 12 November 2018 (UTC)Reply
The current set of normalizations performed before nowikis are added for correctness can be found at Parsoid/Normalizations
Empty styling tags should now be stripped,
https://www.mediawiki.org/wiki/Parsoid/Normalizations#Strip_empty_headings_and_style_tags
Edits that result in runs of consecutive nowikis is still open and filed as,
https://phabricator.wikimedia.org/T108009
Cleaning up old messes (at the first example above was from 2014, long before Parsoid added these normalizations) is filed as,
https://phabricator.wikimedia.org/T107675
The workboard for Parsoid's nowikis is at,
https://phabricator.wikimedia.org/tag/parsoid-nowiki/
but there doesn't seem to be anything specific about lone apostrophes, though the egregious examples don't really seem to be about that and should be covered by the above. Arlolra (talk) 20:57, 21 November 2018 (UTC)Reply

>Empty styling tags should now be stripped,https://www.mediawiki.org/wiki/Parsoid/Normalizations#Strip_empty_headings_and_style_tags

Not true, or not working properly in all cases. I was just fiddling around with visualeditor, and discovered another (https://www.mediawiki.org/w/index.php?title=Project:Sandbox&diff=prev&oldid=2975510).
The steps to reproduce are similar to the ones above:
  1. Go to Sandbox
  2. Type a single apostrophe: '
  3. Select the apostrophe (highlight it)
  4. Set it as bold (Ctrl + B)
  5. Press backspace (delete the apostrophe)
  6. Save page
For whatever reason Visualeditor seems to keep the bold style tags, probably waiting for the user to type more stuff. While Visualeditor could certainly fully erase the <b> tags it doesn't make sense for parsoid to show it at all. My guess is that's the greatest source of these nowiki tags because the user can't even see it at all.
While it may be annoying, in the end VisualEditor could aggressively ask the user if they want to remove strange constructs from the rendering. Sometimes a user may just forget they left something like that behind. 197.235.60.107 (talk) 21:55, 21 November 2018 (UTC)Reply
Hmm, I'm having a hard time reproducing that, given the steps you've provided. Can you tell me about your OS / browser?
Also, if you're familiar with your browser's console, when you're saving your edit (with the "Review your changes" pane open), if you could copy the result of invoking ve.init.target.docToSave.body.outerHTML that would help me determine what Parsoid is receiving to be serialized.
Thanks. Arlolra (talk) 22:29, 21 November 2018 (UTC)Reply
OS, Browser: Windows 7 , Chrome 68
It is strange, it was harder to reproduce it now. It seems to be related to editing an older revision:
  1. Click https://www.mediawiki.org/w/index.php?title=Project:Sandbox&action=edit&oldid=2975510
  2. Remove the apostrophe
  3. Save page
Markup(ve.init.target.docToSave.body.outerHTML) :
<p id="mwBA">Test</p>
<p id="mwBQ"></p><b id="mwBg"><span typeof="mw:Nowiki" id="mwBw"></span></b>
<p id="mwCA"><b id="mwCQ"><span typeof="mw:Nowiki" id="mwCg"></span></b></p></body>
197.235.60.107 (talk) 22:59, 21 November 2018 (UTC)Reply
If you want the full thing it is :
<body id="mwAA" lang="en" class="mw-content-ltr sitedir-ltr ltr mw-body-content parsoid-body mediawiki mw-parser-output" dir="ltr"><div class="borderc8 backgroundc1" style="padding:0.3em 0.5em 0.3em 0.5em; border-style:solid; border-width:medium" about="#mwt1" typeof="mw:Transclusion" data-mw="{&quot;parts&quot;:[{&quot;template&quot;:{&quot;target&quot;:{&quot;wt&quot;:&quot;Please leave this line alone and write below (this is the coloured heading)&quot;,&quot;href&quot;:&quot;./Template:Please_leave_this_line_alone_and_write_below_(this_is_the_coloured_heading)&quot;},&quot;params&quot;:{},&quot;i&quot;:0}}]}" id="mwAg">
<p><span style="color:#cf7606; font-size:140%;"><b>Edit this page</b></span>
<meta property="mw:PageProp/notoc">
This "sandbox" page is to allow you to carry out experiments. Please feel free to try your skills at formatting here. If you want to learn more about how to edit a wiki, please read <a rel="mw:WikiLink" href="./Help:Editing_pages" title="Help:Editing pages">this introduction</a> or the <a rel="mw:WikiLink/Interwiki" href="https://en.wikipedia.org/wiki/Wikipedia:Tutorial" title="en:Wikipedia:Tutorial">tutorial at Wikipedia</a>. This Sandbox is for the classic editing interface. There's also a <a rel="mw:WikiLink" href="./VisualEditor:Test" title="VisualEditor:Test">Sandbox</a> for the <a rel="mw:WikiLink" href="./VisualEditor" title="VisualEditor">VisualEditor</a>.
<meta property="mw:PageProp/noeditsection">
To edit, <b><a rel="mw:ExtLink" class="external text" href="//www.mediawiki.org/w/index.php?title=Project:Sandbox&amp;action=edit">click here</a></b> or <i>"edit"</i> at the top of the page, make your changes in the dialog box, and click the <i>"Save page"</i> button when you are finished.  Please do not add material that is any way offensive, that is copyrighted, or that is at all libelous.</p>
<p><b>If you are looking for information about testing MediaWiki, see <a rel="mw:WikiLink" href="./QA" title="QA" class="mw-redirect">QA</a>.</b></p>
<hr>
<p><i>Content added here will not stay permanently; this page is cleared regularly. <span class="plainlinks"> <a rel="mw:ExtLink" class="external text" href="//www.mediawiki.org/w/index.php?title=Project:Sandbox&amp;oldid=456598&amp;action=edit&amp;summary=reset">Click here to reset the sandbox.</a></span></i></p>
</div><span about="#mwt1"> 
</span><h1 about="#mwt1" id="Testing_Area">Testing Area</h1>
<p id="mwBA">Test</p>
<p id="mwBQ"></p><b id="mwBg"><span typeof="mw:Nowiki" id="mwBw"></span></b>
<p id="mwCA"><b id="mwCQ"><span typeof="mw:Nowiki" id="mwCg"></span></b></p></body>"
197.235.60.107 (talk) 23:01, 21 November 2018 (UTC)Reply
The contract Parsoid has with VE is that, in an edited context, VE will drop the nowiki spans, which still seem to be present here, so it makes sense why the serialized wikitext would still contain the nowikis.
That's from https://phabricator.wikimedia.org/T58381
Pre-edit,
<p><b><span typeof="mw:Nowiki"></span>'</b></p>
Post-edit,
<p></p><b><span typeof="mw:Nowiki"></span></b>
That looks like a VE bug, but maybe it's something Parsoid should be helping with, as discussed in,
https://phabricator.wikimedia.org/T58381#1055479 Arlolra (talk) 23:19, 21 November 2018 (UTC)Reply
Funny thing. I tried deleting all content within the page, and that nowiki tag and its apostrophes friends don't want to be removed. According the the show changes button it remains in the article. Not sure if that's a bug or a feature to prevent removal of "unknown elements".
It is still unexpected. 197.235.60.107 (talk) 23:20, 21 November 2018 (UTC)Reply

Ez dit uzten aldaketak argitaratzen "konposatu inorganikoen nomenklatura "

[edit]
Erabiltzaile agentea: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.140 Safari/537.36 Edge/17.17134

URL: https://eu.wikipedia.org/wiki/Konposatu_inorganikoen_nomenklatura?veaction=edit

Kaixo, artikulu horretan ez dit uzten aldaketak argitaratzen, eta besteetan bai, ez dakit zer egin. Ematen diot "Aldaketak argitaratu" teklari, eta ez da ezer gertatzen, hórrela gelditzen da. Eskerrikasko 84.77.239.154 (talk) 17:17, 4 November 2018 (UTC)Reply

About automatic quote function

[edit]

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


The citation function, type "automatic" of the "beta" function of the "beta wikitext editor" is to mixing/switching the texts. For example, for the IBM about FIPS 140–2 function adds publisher (IBM Knowledge Center) in the title, and add url (www.ibm.com) to work/author...

"<ref>{{Citar web|url=https://www.ibm.com/support/knowledgecenter/pt-br/SSSHTQ_8.1.0/com.ibm.netcool_OMNIbus.doc_8.1.0/omnibus/wip/install/concept/omn_con_fipssupport.html%7C|title=IBM Knowledge Center|work=www.ibm.com}}</ref>". ~ Eli-Lopes (dúvidas?) (talk) 18:29, 8 November 2018 (UTC)Reply

The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

VisualEditor shows html tags with some extensions

[edit]

When I use the Draw.io extension, VisualEditor shows the html tags insead of an image in edit mode.

The same problem exist with extension PageForms, the edit with form link becomes <a href=... 88.67.206.56 (talk) 12:13, 16 November 2018 (UTC)Reply

ok, found the answer: this is a parsoid (security) limitation. Added the 'A' and 'IMG' Tags to TagWhiteList in WikitextConstants.js and now it works 88.67.206.56 (talk) 13:10, 16 November 2018 (UTC)Reply

How to prevent VE from making certain automatic transformations?

[edit]

In this edit the user fixed a typo, but also there were three unwanted automatic transformations. Is there a way to prevent this? Bdijkstra (talk) 09:18, 18 November 2018 (UTC)Reply

Media link corruption is being addressed in Phabricator T198511. Alsee (talk) 06:50, 22 November 2018 (UTC)Reply
The media issue is resolved. The second issue is caused by the non-standard "link" with transclusions. Visualeditor / parsoid doesn't deal with it correctly. That transformation is certainly an issue because any change to the document triggers it. 197.235.232.83 (talk) 07:07, 22 November 2018 (UTC)Reply
Great, the media issue is now indeed acceptable. I see however that it still replaces spaces by underscores in some cases. Bdijkstra (talk) 07:17, 22 November 2018 (UTC)Reply
Indeed. To answer the main question, the simplest way to prevent unintended transformations is to avoid using exotic wikitext markup. Transcluding part of a link is not only unusual but it is potentially confusing to new editors. In fact, I was under the impression that such transclusions should only work if prefixed by ":" , e.g.:
{{:Mediawiki:Example}}
Maybe the real issue is that perhaps second transformation should not work even with the current mediawiki parser. It may be an unintended side-effect because there could certainly be a template named "Template:Mediawiki:Example".
Although it doesn't discount the accuracy of your report. Visualeditor should certainly not be transforming things that the user didn't deliberately edit. 197.235.232.83 (talk) 07:45, 22 November 2018 (UTC)Reply
You are right, the link with Mediawiki:-transclusion should be substed; if and when the tracking category is renamed, its links are easy enough to find. Bdijkstra (talk) 19:06, 22 November 2018 (UTC)Reply

Sequence replacement questions

[edit]

I'm using the code at https://ro.wikipedia.org/wiki/MediaWiki:Diacritice-ve.js to replace "[ŢţŞş]" with "ȚțȘș" (each one with its equivalent). I set a Sequence detection - when one of the characters is introduced, run the code. There are 2 things I need help doing:

  • how to set the cursor? When pasting some (or all) of those letter, the cursor ends up 1-2 chars before the end of the string (depending on the length of the paste?). What can I do to make sure the cursor ends up in the same place it was before the sequence matched? I tried saving the positions and re-setting it in replaceAllTextDiacritics, but in the case of pastes, I believe the Sequence function changes the location before my function is called.
  • how can I run the code when a character is added from the toolbar?

Thanks! Strainu (talk) 13:50, 20 November 2018 (UTC)Reply

Have you seen VisualEditor/Gadgets and its subpages? Whatamidoing (WMF) (talk) 17:44, 22 February 2019 (UTC)Reply
I have. Could you be a bit more specific on what part might be relevant for my questions? Thanks. Strainu (talk) 18:20, 22 February 2019 (UTC)Reply
Realistically, it might be the "missing parts".  :-( There are a couple of pages that talk about gadgets, but my guess is that most people can't find what they need there.
The problem of the cursor being in the wrong place sounds like a difference in byte-lengths and character-lengths. "Ţ" is one character, but two bytes, so if the cursor goes backwards the correct number of bytes, it'll be one character too far.
I don't know how you could make this apply in advance to the VisualEditor/Special characters tool, but is it necessary? Presumably people normally choose the correct character.

Whatamidoing (WMF) (talk) 19:14, 22 February 2019 (UTC)Reply
Hmm, interesting hypothesis with the bytes vs. chars. I've revisited the behavior and the problem only appears when the last character is a diacritic. I'll see if I can put some debugging in place to check if your hunch is correct. The second issue is nice to have, but we can live without it. Thanks! Strainu (talk) 19:27, 22 February 2019 (UTC)Reply

Unwanted vertical whitespace added

[edit]

This has likely been reported before, but anyway: in [https://nl.wikipedia.org/w/index.php?title=Nieuwesluis_(Wieringermeer)&diff=51677692&oldid=51676992 this edit], a newline was (presumably automatically) added between two template incantations, which resulted in extra vertical space at the start of an article. ~ – gpvos (talk)User:Gpvos 19:41, 21 November 2018 (UTC)Reply

That needs to be defined using TemplateData format. 197.235.60.107 (talk) 20:25, 21 November 2018 (UTC)Reply
The linked diff is a 2017 source edit. There's a big problem if it is indeed screwing with the wikitext that the user entered. Alsee (talk) 06:39, 22 November 2018 (UTC)Reply
Indeed, the 2017 wikitext editor doesn't change what the user entered as its saving the page, and its template editor possesses no way to edit existing templates. Either the user deliberately added that spacing, or a tool or gadget they use did so. 197.235.232.83 (talk) 07:02, 22 November 2018 (UTC)Reply

VisualEditor on namespace #4: Wikipedia

[edit]

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


Hello,

On fr:wp we start a survey to enable VE within pages of namespace #4, Wikipedia. In 2015, we did it for namespaces Portal and Wikiproject and we are very happy about it. Now, in 2018, VE is a very powerful tool, which is used by a majority of contributors, so I'm wondering if there is a limitation to enable it in that namespace.

In a nutshell, on fr.wp, all our GLAM pages are in that namespace, and I receive a lot of requests from institutions staff that their GLAM pages are not easy to edit.

Thank you in advance, Benoit Rochon (talk) 20:44, 21 November 2018 (UTC)Reply

The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Miten lisätyn virheellisen kuvan voi poistaa?

[edit]
User agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.102 Safari/537.36

URL: https://fi.wikipedia.org/w/index.php?title=Tiedosto:Finnkinon_logo.svg&stable=0&veaction=edit

Olen yrittänyt poistaa logoa, joka ei ole ollut Finnkinon käytössä enäää vuosikausiin. Sivun muokkaustilassa on vain maininta etten voi korvata kuvatiedostoa uudella?! Ihmiset löytävät tämän logon googlen kautta ja käyttävät sitä koska he luottavat wikipediaan. Voisitteko ystävällisesti poistaa tämän vanhentuneen logon välittömästi. Hovitin1 (talk) 07:55, 26 November 2018 (UTC)Reply

Hei, vastaan Wikipedian puolella esimerkiksi keskustelusivullasi. Yritit muokata tiedoston sivua, mutta itse tiedostoja voivat poistaa vain ylläpitäjät. Jos tiedoston haluaa pois artikkelista niin silloin pitää muokata artikkelia eikä tiedostoa. I will reply on the talk page of the user on Finnish Wikipedia. User tried to remove an image by editing the image page. kyykaarme (talk) 08:06, 26 November 2018 (UTC)Reply

Ошибки в редакторе. Bugs.

[edit]
Браузер: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36

URL: https://ru.wikipedia.org/w/index.php?title=%D0%A3%D1%87%D0%B0%D1%81%D1%82%D0%BD%D0%B8%D0%BA:Concrete_Stocking/%D0%A7%D0%B5%D1%80%D0%BD%D0%BE%D0%B2%D0%B8%D0%BA&veaction=edit&oldid=96445967

1. Если поставить ударение любым из имеющихся шаблонов в текстовом редакторе, а затем переключиться в визуальный, то шаблон будет показан как текст, ударение не отобразится.

2. Если из текстового редактора перейти в визуальный, после чего нажать "Записать страницу", то кнопки для быстрого описания изменений (викиф, оформл, стил и остальные) не отобразятся.

  1. If you put a stress with a template in the common editor and then switch to the visual one, the stress won't appear, you'll just see the template as a text instead.
  2. If you switch from the common editor to the visual one, the buttons for a short description of your changes won't appear. (I don't know if there are any in the English Wikipedia, but there are some in the Russian one) Concrete Stocking (talk) 16:39, 28 November 2018 (UTC)Reply
1: I'm not entirely sure what a stress is.. can you help me ?
2: "short description of your changes" that is a local gadget, that was not updated to support VE yet. The english wikipedia supports this in https://en.wikipedia.org/wiki/MediaWiki:Gadget-defaultsummaries.jsTheDJ (Not WMF) (talkcontribs) 13:17, 29 November 2018 (UTC)Reply
  1. sure! stress (in this case) = ''the emphasis you put on one part of a word. In the word 'blanket', the stress is on the first syllable.''
  2. got it Concrete Stocking (talk) 13:51, 29 November 2018 (UTC)Reply
Can you give me a link to a template for adding emphasis to text? Whatamidoing (WMF) (talk) 06:55, 22 February 2019 (UTC)Reply
I use the Russian wiki, so the page is in Russian. [1] (if you save the changes or click 'show preview', the emphasis can be seen, but when you switch from one editor to the other, it can't) Concrete Stocking (talk) 16:14, 26 February 2019 (UTC)Reply
The only thing in that template is:
́
That's U+0301, the "Combining Acute Accent". That character doesn't result in italics, bold, or <em>. Is it meant to be this?
'
That's U+0027, the straight "Apostrophe". Whatamidoing (WMF) (talk) 19:56, 4 April 2019 (UTC)Reply