Hoo man has uploaded a new change for review.

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

Change subject: Don't log warning for alternate links in parser output
......................................................................

Don't log warning for alternate links in parser output

Sometimes parser output is requested before an id is assigned,
such as when creating an entity and checking against spam blacklist.

Bug: T104609
Change-Id: Ie278de8a2900f2c53a4128425628e5b357b3708d
---
M repo/includes/EntityParserOutputGenerator.php
1 file changed, 3 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase 
refs/changes/78/228878/1

diff --git a/repo/includes/EntityParserOutputGenerator.php 
b/repo/includes/EntityParserOutputGenerator.php
index 7f25247..529ed2e 100644
--- a/repo/includes/EntityParserOutputGenerator.php
+++ b/repo/includes/EntityParserOutputGenerator.php
@@ -199,10 +199,11 @@
                // set the display title
                //$parserOutput->setTitleText( $entity>getLabel( $langCode ) );
 
+               // Sometimes extensions like SpamBlacklist might call 
getParserOutput
+               // before the id is assigned, during the process of creating a 
new entity.
+               // in that case, no alternate links are added, which probably 
is no problem.
                if ( $entity->getId() !== null ) {
                        $this->addAlternateLinks( $parserOutput, 
$entity->getId() );
-               } else {
-                       wfLogWarning( "Encountered an Entity without EntityId 
in EntityParserOutputGenerator." );
                }
 
                return $parserOutput;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie278de8a2900f2c53a4128425628e5b357b3708d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: wmf/1.26wmf16
Gerrit-Owner: Hoo man <h...@online.de>
Gerrit-Reviewer: Aude <aude.w...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to