Last modified: 2009-09-30 19:12:52 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 T21886, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 19886 - Minor, watch checkboxes are reset following an edit conflict
Minor, watch checkboxes are reset following an edit conflict
Status: RESOLVED WORKSFORME
Product: MediaWiki
Classification: Unclassified
Page editing (Other open bugs)
unspecified
All All
: Normal minor with 1 vote (vote)
: ---
Assigned To: Trevor Parscal
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-07-23 02:49 UTC by FT2
Modified: 2009-09-30 19:12 UTC (History)
3 users (show)

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


Attachments
Attempted fix. (87.52 KB, patch)
2009-09-30 03:12 UTC, mac.med02
Details

Description FT2 2009-07-23 02:49:45 UTC
When a user's post is edit conflicted, the edit summary is preserved in the new edit screen, but the checkboxes for "minor edit" and "watch this page" are not.

Can those be kept as the user had selected them too?
Comment 1 Brion Vibber 2009-08-01 00:23:24 UTC
Clarified summary; assigning to Trevor as part of editing screen cleanup.
Comment 2 mac.med02 2009-09-30 03:11:38 UTC
I apologize if this is completely wrong, but would something as simple as this work? (Disclosure: completely new to this, just giving it a shot.)

Index: EditPage.php
===================================================================
--- EditPage.php        (revision 57025)
+++ EditPage.php        (working copy)
@@ -991,10 +991,10 @@
                if ( $this->isConflict ) {
                        wfDebug( "EditPage::editForm conflict! getting section '
$this->section' for time '$this->edittime' (article time '" .
                                $this->mArticle->getTimestamp() . "')\n" );
-                       $text = $this->mArticle->replaceSection( $this->section,
 $this->textbox1, $this->summary, $this->edittime );
+                       $text = $this->mArticle->replaceSection( $this->section,
 $this->textbox1, $this->summary, $this->edittime, $this->minoredit, $this->watc
hthis );
                } else {
                        wfDebug( "EditPage::editForm getting section '$this->sec
tion'\n" );
-                       $text = $this->mArticle->replaceSection( $this->section,
 $this->textbox1, $this->summary );
+                       $text = $this->mArticle->replaceSection( $this->section,
 $this->textbox1, $this->summary, $this->minoredit, $this->watchthis );
                }
                if ( is_null( $text ) ) {
                        wfDebug( "EditPage::editForm activating conflict; sectio
n replace failed.\n" );
Comment 3 mac.med02 2009-09-30 03:12:55 UTC
Created attachment 6601 [details]
Attempted fix.
Comment 4 Roan Kattouw 2009-09-30 09:12:38 UTC
(In reply to comment #3)
> Created an attachment (id=6601) [details]
> Attempted fix.
> 

Please attach a patch instead of the complete EditPage.php file.

(In reply to comment #2)
> I apologize if this is completely wrong, but would something as simple as this
> work? (Disclosure: completely new to this, just giving it a shot.)
> 
You're passing extra parameters to Article::replaceSection(), so you'd need to modify that function to actually do something with them. Either way, replaceSection() is not the right place to do this, as it simply merges two sets of changes and returns the result. The return value (which is assigned to $text) is just plain text and has no way of storing complex stuff such as minor and watch toggles.
Comment 5 mac.med02 2009-09-30 19:12:52 UTC
Seems to work when trying to emulate the problem.

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


Navigation
Links