Page MenuHomePhabricator

QuickSurveysResponses Missing or empty schema on beta labs
Closed, ResolvedPublic

Description

Reproduce by browsing to http://en.m.wikipedia.beta.wmflabs.org/wiki/Alcatraz_Island?quicksurvey=true and clicking yes in the quick survey box.

Throws [QuickSurveysResponses] Missing or empty schema.

Event Timeline

rmoen claimed this task.
rmoen raised the priority of this task from to Needs Triage.
rmoen updated the task description. (Show Details)
rmoen subscribed.

Change 237145 had a related patch set uploaded (by Robmoen):
Fix typo with example survey schema config

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

The error suggests that the schema isn't loaded properly. Looking at the code I don't see a ResourceLoader schema.QuickSurveysResponses module added anywhere...

Change 237145 abandoned by Robmoen:
Fix typo with example survey schema config

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

rmoen renamed this task from QuickSurveysResponses Typo for schema in beta labs config to QuickSurveysResponses Missing or empty schema on beta labs.Sep 9 2015, 6:25 PM
rmoen updated the task description. (Show Details)
rmoen removed a project: Patch-For-Review.
rmoen set Security to None.
rmoen moved this task from -1 (Needs More Work) to Doing on the Reading-Web-Sprint-55-π board.

@Jdlrobson: I'm not sold on having EventLogging as an optional dependency for QuickSurveys. Why are we worried at this point about it not being installed?

Change 237173 had a related patch set uploaded (by Jdlrobson):
Fix schema dependency and resolve other logging errors

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

For completeness and transparency to other team members in IRC @rmoen and I chatted.
I was concerned that the patch made EventLogging a required dependency without explicitly saying so.

I proposed one of two solutions:

  • Asserting the dependency in onExtensionSetup hook

OR
Conditionally adding the schemas so that people do not have to setup EventLogging to test out QuickSurveys.

The error suggests that the schema isn't loaded properly. Looking at the code I don't see a ResourceLoader schema.QuickSurveysResponses module added anywhere...

It's being added here: https://github.com/wikimedia/mediawiki-extensions-QuickSurveys/blob/master/includes/QuickSurveys.hooks.php#L105

That registers a schema but doesn't make it accessible in ResourceLoader... (Backend usage only)

That registers a schema but doesn't make it accessible in ResourceLoader... (Backend usage only)

All schemas added to the $schemas map are registered as RL modules once the hook has completed firing: EventLoggingHooks#L65-L80.

Yeh but you still need to pass the schema to the page... Looking at the code I don't see a ResourceLoader schema.QuickSurveysResponses module added anywhere...

Change 237173 merged by jenkins-bot:
Fix schema dependency and resolve other logging errors

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

Can't sign this off until we do another release so moving to next sprint.