Page MenuHomePhabricator

Badly defined surveys cause issues
Closed, ResolvedPublic

Description

(When fixing please add a test)
Notice: Undefined index: description in /Users/jrobson/git/core/extensions/QuickSurveys/includes/QuickSurveys.hooks.php on line 57

Define:

$wgQuickSurveysConfig = array(
	array(
		"@name"=> "survey name",
		"name"=> "internal example survey",
		"@type"=> "internal or external link survey",
		"type"=> "internal",
		"@question"=> "survey question message key",
		"question"=> "ext-quicksurveys-example-internal-survey-question",
		"@answers"=> "possible answer message keys for positive, neutral, and negative",
		"answers"=> array(
			"positive"=> "ext-quicksurveys-example-internal-survey-answer-positive",
			"neutral"=> "ext-quicksurveys-example-internal-survey-answer-neutral",
			"negative"=> "ext-quicksurveys-example-internal-survey-answer-negative"
		),
		"@schema"=> "Which schema to log to",
		"schema"=> "QuickSurveysResponse",
		"@enabled"=> "whether the survey is enabled",
		"enabled"=> true,
		"@coverage"=> "percentage of users that will see the survey",
		"coverage"=> "100",
		"@platform"=> "for each platform (desktop, mobile), which version of it is targeted (stable, beta, alpha)",
		"platform"=> array(
			"desktop"=> ["stable"],
			"mobile"=> ["stable", "beta", "alpha"]
		)
	),

and notice an error when you load the page at http://localhost:8888/w/index.php/Headings?quicksurvey=true

Event Timeline

Jdlrobson raised the priority of this task from to Needs Triage.
Jdlrobson updated the task description. (Show Details)
Jdlrobson added a subscriber: Jdlrobson.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptAug 25 2015, 4:24 PM
Jdlrobson updated the task description. (Show Details)
Jdlrobson set Security to None.
phuedx claimed this task.Aug 26 2015, 10:55 AM
phuedx moved this task from To Do to Doing on the Reading-Web-Sprint-54-28-Days-Later board.

Change 234267 had a related patch set uploaded (by Phuedx):
Model internal and external surveys

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

(When fixing please add a browser test)

Won't a PHP unit test suffice?

Jdlrobson updated the task description. (Show Details)Aug 27 2015, 3:30 PM

fyi jenkins was playing up and fixed by https://gerrit.wikimedia.org/r/234414
Still not sure what the root cause was though. An issue with that job.

Change 234267 merged by jenkins-bot:
Model internal and external surveys

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

Jhernandez closed this task as Resolved.Aug 28 2015, 10:54 AM
Jhernandez added a subscriber: Jhernandez.