Last modified: 2014-06-26 00:07:12 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 T55767, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 53767 - VisualEditor: <div class="ve-ce-protectedNode"> not always preventing editing in VE
VisualEditor: <div class="ve-ce-protectedNode"> not always preventing editing...
Status: RESOLVED WONTFIX
Product: VisualEditor
Classification: Unclassified
MediaWiki integration (Other open bugs)
unspecified
All All
: Normal enhancement
: ---
Assigned To: Editing team bugs – take if you're interested!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-09-04 18:06 UTC by kwwilliams
Modified: 2014-06-26 00:07 UTC (History)
11 users (show)

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


Attachments

Description kwwilliams 2013-09-04 18:06:52 UTC
When articles contain items that lead VE to corrupt the article, we've been protecting them by wrapping the article with <div class="ve-ce-protectedNode"> and </div>. This used to keep VE from being able to select any material within the article, which allowed us to keep the article from being corrupted.

VE is now allowing edits to templates inside the article (see https://en.wikipedia.org/w/index.php?title=Teenage_Dream_%28Katy_Perry_album%29&veaction=edit for an example), so we now have no way to protect articles that we know VE cannot handle.
Comment 1 Chris McKenna 2013-09-04 18:19:52 UTC
The original person to report this noted that they were using Chrome 29 on Windows 7.

I have been unable to reproduce this in Firefox 23 on Linux.

Neither kww or the ip who can reproduce this have noted their system.
Comment 2 kwwilliams 2013-09-04 18:24:26 UTC
Firefox 23.0.1 on Windows 7.

To be clear, we are still prevented from editing the text. We are not prevented from editing templates, and we can insert text before div.
Comment 3 Chris McKenna 2013-09-04 18:53:39 UTC
According to the documentation, the div is only meant to block editing to a section of a page (although that section can be the whole text), so adding text before is correct, likewise you should be able to add text after the /div.

The editing templates within the div does sound like a bug though.

If VE (or Parsoid possibly) is not treating the div as invariant then the div definitely isn't doing what it was intended to do.
Comment 4 kwwilliams 2013-09-04 19:02:56 UTC
(In reply to comment #3)
> According to the documentation, the div is only meant to block editing to a
> section of a page (although that section can be the whole text), so adding
> text
> before is correct, likewise you should be able to add text after the /div.
It's a change from the original behaviour. I agree that it's not technically wrong.
Comment 5 kwwilliams 2013-09-04 19:28:40 UTC
The div has been removed, so people need to look at https://en.wikipedia.org/w/index.php?title=Teenage_Dream_%28Katy_Perry_album%29&oldid=571540632
Comment 6 James Forrester 2013-09-04 19:35:01 UTC
(In reply to comment #5)
> The div has been removed, so people need to look at
> https://en.wikipedia.org/w/index.
> php?title=Teenage_Dream_%28Katy_Perry_album%29&oldid=571540632

In this particular case, note that the reason everything was broken in editing this page was because the <ref> was defined outside of the table cell, in a the non-space between the end of the cell and the start of the row, and only happened to "work" in WT mode because of HTML Tidy moving it to somewhere sane - Ed's edit to the page fixed the duplication so the desired protection is no longer needed: https://en.wikipedia.org/w/index.php?title=Teenage_Dream_(Katy_Perry_album)&diff=571550633&oldid=571540632

On the wider point, it's not clear if there's an actual long-term need for a proper VE-prevention system (or if it's all solvable with a few quick fixes of bad wikitext), but if there is, we should build a proper one, not rely on a hack that might break.
Comment 7 kwwilliams 2013-09-04 19:55:43 UTC
(In reply to comment #6)
> On the wider point, it's not clear if there's an actual long-term need for a
> proper VE-prevention system (or if it's all solvable with a few quick fixes
> of
> bad wikitext), but if there is, we should build a proper one, not rely on a
> hack that might break.

What's unclear about that?

I agree that it would be better to do this with a category, but the need for VE to recognise some flag that tells it not to edit a given article seems fairly obvious. As long as VE mutilates pages in response to inputs that behaved reasonably with the working software, we will require a mechanism to tell VE not to edit certain pages.
Comment 8 NicoV 2013-09-05 11:14:50 UTC
I tried again on my test page on a different computer running Firefox 17.0.2 (ESR) under XP.

At first, it seemed that the protected node was working, but at some point (after clicking, double-clicking, typing, ...) I managed to write in the protected node: the result was an even greater mess than before: still the duplication, quotes added all over the place (they seem correct but unnecessary), pipes removed, space added, ...

https://en.wikipedia.org/w/index.php?title=User%3ANicoV%2FTest&diff=571628361&oldid=571542702
Comment 9 kwwilliams 2013-09-08 20:20:01 UTC
Note https://en.wikipedia.org/w/index.php?title=Wikipedia:VisualEditor/Feedback&diff=572094345&oldid=572076135 , where another 26,000 articles that VE mutilates have been identified.

We really need to have a method to shield articles from VE. It's critical to do, and beyond reason to expect that we will always modify articles to conform to VE's expectations.
Comment 10 John Mark Vandenberg 2013-10-01 14:28:32 UTC
I was very easily able to reproduce this problem; I dont have exact steps to reproduce, but with a few clicks and keypresses in the content area, all content was removed and the text I typed appeared in the body of the article.  Undo appeared to work as expected, however 'Review your changes' did not return any results - it hung, but didnt lock up the browser.  The toolbar is another way to override the protectedNode.

This template is also being used to create a 'pre' text area on
https://en.wikipedia.org/w/index.php?title=Morse_code&veaction=edit
Comment 11 James Forrester 2013-10-09 18:08:20 UTC
Changing this to "Provide a way to block VisualEditor from being active on a page"; I worry that this will lead to yet another magic word, but oh well.
Comment 12 John Mark Vandenberg 2013-11-08 04:50:36 UTC
James, that is bug 52141.  This bug was about a specific problem with the existing code.
Comment 13 This, that and the other (TTO) 2014-06-22 05:50:23 UTC
As it stands, this is a dupe of bug 52141. I've put back the original bug summary; it seems to me that WONTFIX is the appropriate resolution for this bug.
Comment 14 James Forrester 2014-06-26 00:07:12 UTC
(In reply to This, that and the other from comment #13)
> As it stands, this is a dupe of bug 52141. I've put back the original bug
> summary; it seems to me that WONTFIX is the appropriate resolution for this
> bug.

Agreed.

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


Navigation
Links