Last modified: 2014-06-18 21:00:59 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T58213, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 56213 - VisualEditor: Wikitext warning not triggered when editing image captions, references
VisualEditor: Wikitext warning not triggered when editing image captions, ref...
Status: RESOLVED FIXED
Product: VisualEditor
Classification: Unclassified
MediaWiki integration (Other open bugs)
unspecified
All All
: Low minor
: VE-deploy-2014-06-19
Assigned To: Alex Monk
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-27 12:31 UTC by Chris McKenna
Modified: 2014-06-18 21:00 UTC (History)
6 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Chris McKenna 2013-10-27 12:31:30 UTC
Wikitext added to image captions is nowikied in the same way that markup added to the page body is. e.g. https://en.wikipedia.org/w/index.php?title=User%3AThryduulf%2Fsandbox&diff=578947711&oldid=574091986 however the wikitext warning is not generated.

To reproduce:
1. Load any page with an image in VE
2. Edit the image caption
3. Add any wiki markup in the caption (tested with bold, italic and links)

Expected behaviour: The wikitext warning pops up.
Action behaviour: Nothing happens

If popping up the warning while in the image caption dialog is not possible, then it should do so immediately the dialog is closed. Displaying it at the same time would be preferable though.
Comment 1 Alex Monk 2014-06-10 23:27:33 UTC
I started looking at this. It's annoying because the code to do the wikitext detection is already there and working for the main surface. It would be trivial to do the absolutely wrong way (i.e. copy the existing code to the reference surface or image caption surface and just change the reference to the Surface object), but it's a pain to fix the proper way.

One of the problems lies in the differences between normal surfaces (i.e. the main one) and surface widgets. It was suggested that we could implement MWSurfaceWidget which does the wikitext warning, but the main surface is not a widget and would still need it's own version of the code.

Also, we can't just shove the wikitext detection code in the ve.ui.Surface class and guard it with some config, because the Surface code lives in VE core which does not deal with MediaWiki features (wikitext) - the VE MediaWiki extension deals with that.

Roan suggested we could make the main surface be a surface widget and then create an MWSurfaceWidget, but that apparently has issues involving toolbar floating (I'm not familiar with this, perhaps it could be fixed in some way).

I think that for now, we can probably change the wikitext detection function to accept a surface parameter, then make it static somewhere and have each wikitext-free surface to set up an event handler for it.
Comment 2 Gerrit Notification Bot 2014-06-11 00:11:13 UTC
Change 138761 had a related patch set uploaded by Alex Monk:
Show wikitext warnings in the reference dialog

https://gerrit.wikimedia.org/r/138761
Comment 3 Gerrit Notification Bot 2014-06-18 21:00:31 UTC
Change 138761 merged by jenkins-bot:
Show wikitext warnings in the reference and media caption dialogs

https://gerrit.wikimedia.org/r/138761

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links