Mattflaschen has uploaded a new change for review.

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

Change subject: Add debugging code for invalid titles in WikiReference
......................................................................

Add debugging code for invalid titles in WikiReference

This happens when there is an invalid title (e.g. contains '|'), not
just when it's a red link (non-existent).

I'm not sure if we can do anything about it here, but this will help
track down the bad data, and then how it's getting into flow_wiki_ref.

Plus, minor comment fixes.

Bug: T111267
Change-Id: Ie22b02e12aaf27c05f7730d67b105d0b43e22fc0
---
M includes/Model/WikiReference.php
1 file changed, 5 insertions(+), 2 deletions(-)


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

diff --git a/includes/Model/WikiReference.php b/includes/Model/WikiReference.php
index 0f1fbd9..2973d70 100644
--- a/includes/Model/WikiReference.php
+++ b/includes/Model/WikiReference.php
@@ -15,7 +15,7 @@
        /**
         * @param String $wiki Wiki ID of the reference source
         * @param UUID   $srcWorkflow ID of the source Workflow
-        * @param Title  $srcTitle    Title of the reference's target.
+        * @param Title  $srcTitle    Title of the Workflow from which this 
reference comes.
         * @param string $objectType  Output of getRevisionType for the 
AbstractRevision that this reference comes from.
         * @param UUID   $objectId    Unique identifier for the revisioned 
object containing the reference.
         * @param string $type        Type of reference
@@ -83,7 +83,7 @@
         *
         * @param int $namespace Namespace number
         * @param string $title Title text
-        * @return Title
+        * @return Title|null
         */
        public static function makeTitle( $namespace, $title ) {
                try {
@@ -91,6 +91,9 @@
                } catch ( InvalidInputException $e ) {
                        // duplicate Title::makeTitleSafe which returns null on 
failure,
                        // but only for InvalidInputException
+
+                       wfDebugLog( 'Flow', __METHOD__ . ": Invalid title.  
Namespace: $namespace, Title text: $title" );
+
                        return null;
                }
        }

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

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

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

Reply via email to