Page MenuHomePhabricator

get_web_data seems to return empty when called from PageForms and resets existing entries.
Closed, ResolvedPublicBUG REPORT


List of steps to reproduce (step by step, including full links if applicable):

What happens?:
I don't really know but the culprit is a function that was deleted. The following patch restores the functionality though...

diff --git a/includes/EDParserFunctions.php b/includes/EDParserFunctions.php
index 621eb00..59cb12c 100644
--- a/includes/EDParserFunctions.php
+++ b/includes/EDParserFunctions.php
@@ -425,4 +425,8 @@ class EDParserFunctions {
        public static function doClearExternalData( Parser &$parser ) {
                self::$values = [];
+       public static function getAllValues() {
+               return self::$values;
+       }

I also found this that claims this function was added to ExternalData 2.3 and it is needed for PageForms which is exactly my use case.

It's in the bullet about version 2.3

What should have happened instead?:

It shouldn't reset the already entered strings. Autocomplete should not come up empty.

Hope that helps to pinpoint the problem.

Software version (if not a Wikimedia wiki), browser information, screenshots, other information, etc:

  • mediawiki 1.35.2 from git
  • ExternalData from git
  • PageForms 5.2.1

Event Timeline

Change 692024 had a related patch set uploaded (by Alex Mashin; author: mashin):

[mediawiki/extensions/ExternalData@master] Return accidentally deleted EDParserFunctions::getAllValues()

alex-mashin triaged this task as Unbreak Now! priority.

Change 692024 merged by jenkins-bot:

[mediawiki/extensions/ExternalData@master] Return accidentally deleted EDParserFunctions::getAllValues()

Still UBN? Presumably you'll want to do a release…

Yaron_Koren added a subscriber: Yaron_Koren.

I assume this patch fixed this bug.