Sbisson has uploaded a new change for review.

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

Change subject: BoardMover: don't try to save a null edit
......................................................................

BoardMover: don't try to save a null edit

BoardMover assists in the move of Flow pages by
updating objects' association from the old to
the new page.

It also tries to reparse the current header
so magic words like basepagename are updated
for the new page location. This part
sometimes generates null edits that are not
seen as null edits by the storage layer. This
leads to exceptions that abort the move but do
not bubble up to the OptinController. It results
in inconsistent state.

Bug: T138310
Change-Id: Iff7f699b7604da608154231c4d46b17c1dc08541
---
M includes/BoardMover.php
1 file changed, 5 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow 
refs/changes/52/313052/1

diff --git a/includes/BoardMover.php b/includes/BoardMover.php
index 988a8c2..41344bd 100644
--- a/includes/BoardMover.php
+++ b/includes/BoardMover.php
@@ -109,9 +109,11 @@
                                'edit-header',
                                $newPage
                        );
-                       $this->storage->put( $nextHeader, array(
-                               'workflow' => $discussionWorkflow,
-                       ) );
+                       if ( $header !== $nextHeader ) {
+                               $this->storage->put( $nextHeader, array(
+                                       'workflow' => $discussionWorkflow,
+                               ) );
+                       }
                }
        }
 

-- 
To view, visit https://gerrit.wikimedia.org/r/313052
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iff7f699b7604da608154231c4d46b17c1dc08541
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Sbisson <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to