Page MenuHomePhabricator

Fix SurveyFactory and messages mounting
Closed, ResolvedPublic

Description

A couple of issues found during testing:

  • In SurveyFactory.php -> L390 (factoryExternal function), we're looping through the array $questions - we can't use the var $question as it already exists and is being used above in L368.
  • The method getMessages() needs to account for all messages used, we included more props like questions (array of objects) and all items in this array need to be verified to mount the messages array (used when registering the survey module in Hooks.php -> onResourceLoaderRegisterModules()

Event Timeline

Change #1031547 had a related patch set uploaded (by Mimurawil; author: Mimurawil):

[mediawiki/extensions/QuickSurveys@master] T364793: Fix messaging formation in new field `questions`

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