Last modified: 2007-08-08 16:56:57 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 T12679, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 10679 - diff deletes text in edit form in the Page: namespace
diff deletes text in edit form in the Page: namespace
Status: RESOLVED INVALID
Product: MediaWiki extensions
Classification: Unclassified
ProofreadPage (Other open bugs)
unspecified
All All
: Normal major (vote)
: ---
Assigned To: Nobody - You can work on this!
https://secure.wikimedia.org/wikisour...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-07-24 13:57 UTC by Graf.Zahl
Modified: 2007-08-08 16:56 UTC (History)
2 users (show)

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


Attachments

Description Graf.Zahl 2007-07-24 13:57:02 UTC
To demonstrate the bug:

1. Go to e.g.

https://secure.wikimedia.org/wikisource/en/w/index.php?title=Page:Squaring_the_circle.djvu&action=edit

You'll note that the wiki markup is split over three edit forms, header, body and footer.

2. Press "Show changes"

3. The text in the first and third edit forms will have vanished (duly noted by the diff).


It seems like the diff function simply ignored the header and footer edit forms. Personally, I would have nothing against getting rid of three-way splitting the markup altogether.
Comment 1 Huji 2007-07-24 16:52:11 UTC
Well, as soon as I press the "Show preview" button, the top and bottom edit boxes are hidden. Their data is automatically added to the middle edit box (the top one is added to the beginning, and the bottom one is added to the end) and everything is fine. I expect the same to happen when I press "Show changes" but it doesn't. It seems like copying relevant parts from the "Show preview" code can fix this bug.
Comment 2 Graf.Zahl 2007-07-24 22:03:48 UTC
(In reply to comment #1)
> Well, as soon as I press the "Show preview" button, the top and bottom edit
> boxes are hidden. Their data is automatically added to the middle edit box (the
> top one is added to the beginning, and the bottom one is added to the end) and
> everything is fine. I expect the same to happen when I press "Show changes" but
> it doesn't. It seems like copying relevant parts from the "Show preview" code
> can fix this bug.

Excellent observation! Investigating your theory, I found that the faulty code is not within the extension but in the accompanying JavaScript:

http://wikisource.org/wiki/MediaWiki:Page.js

The relevant code is:

			saveButton = document.getElementById("wpSave"); 
			saveButton.setAttribute("onclick","prpConcat(this.form);");
			previewButton = document.getElementById("wpPreview"); 
			previewButton.setAttribute("onclick","prpConcat(this.form);");

Seems that all that needs to be done is add the following two lines:

diffButton = document.getElementById("wpDiff")
diffButton.setAttribute("onclick","prpConcat(this.form);");

I'll ask ThomasV to do that, he's an admin on oldwikisource.
Comment 3 Aryeh Gregor (not reading bugmail, please e-mail directly) 2007-07-25 02:12:52 UTC
Not an issue with the extension, it's a custom JS bug.
Comment 4 ThomasV 2007-07-26 07:59:20 UTC
Fixed in svn. Actually, the bug was in the extension javascript. 
Comment 5 Brion Vibber 2007-08-08 16:56:57 UTC
For future reference, please list the revision number in the bug comment when marking things fixed if possible -- makes it easier to find the affected code history. :)

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


Navigation
Links