Page MenuHomePhabricator

Quick surveys do not show up on pages without infoboxes that have table of contents
Closed, ResolvedPublic

Description

When you visit this page on desktop, you'll notice that the reader trust survey loads (if you have DNT disabled). However, when you visit the corresponding mobile page the survey won't show up. The configuration looks like this:

{
    "coverage": 1,
    "description": "Reader-trust-1-description",
    "instanceTokenParameterName": "token",
    "isInsecure": false,
    "link": "Reader-trust-1-link",
    "module": "ext.quicksurveys.survey.Reader-trust-survey-en-v1",
    "name": "Reader-trust-survey-en-v1",
    "platforms": {
        "desktop": [
            "stable"
        ],
        "mobile": [
            "stable"
        ]
    },
    "privacyPolicy": "Reader-trust-1-privacy",
    "question": "Reader-trust-1-message",
    "type": "external"
}

Developer notes

The problem is specific to this page and its HTML.
If there's no infobox, it attempts to insert the survey before the first heading.
However, this was incorrectly matching the table of contents heading.

Event Timeline

leila renamed this task from Quick survey won't show up on mobile to Quick survey won't show up on mobile in beta cluster.Dec 14 2018, 8:30 PM

@bmansurov did you work this out?
Can I resolve this? Is there a bug here that needs to be fixed?

@Jdlrobson I think the bug still exists on the beta cluster, but the last survey we ran showed up fine on mobile in production. It's a minor inconvenience when we want to test the survey before going to production, but I think we can live with this bug if your team doesn't have bandwidth to work on it now.

Was a patch made to update the beta cluster configuration to have the survey? Can you point me to that patch?

Yes, that's the one. But it doesn't appear on the Book article. So I guess something is wrong with that page maybe?

Jdlrobson renamed this task from Quick survey won't show up on mobile in beta cluster to Quick surveys do not show up on pages without infoboxes.Feb 26 2019, 10:00 PM
Jdlrobson updated the task description. (Show Details)

Change 493118 had a related patch set uploaded (by Jdlrobson; owner: Jdlrobson):
[mediawiki/extensions/QuickSurveys@master] Correct a query selector

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

I got to the bottom of this. Basically the survey was not showing for any articles without an infobox in production. This bug was not specific to the beta cluster. I'm not sure how this impacted your survey running but you should probably take it into account when looking at your impression numbers. The number of pages without an infobox is likely significant. The above patch takes care of it. Review appreciated!

Jdlrobson renamed this task from Quick surveys do not show up on pages without infoboxes to Quick surveys do not show up on pages without infoboxes that are not stubs.Feb 26 2019, 10:04 PM
Jdlrobson renamed this task from Quick surveys do not show up on pages without infoboxes that are not stubs to Quick surveys do not show up on pages without infoboxes that are not stubs and have images.
Jdlrobson renamed this task from Quick surveys do not show up on pages without infoboxes that are not stubs and have images to Quick surveys do not show up on pages without infoboxes that have table of contents.

Change 493118 merged by jenkins-bot:
[mediawiki/extensions/QuickSurveys@master] Correct a query selector

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

bmansurov closed this task as Resolved.EditedMar 1 2019, 3:07 PM
bmansurov removed a project: Patch-For-Review.

The patch's been merged. Thanks for the fix, Jon!