Page MenuHomePhabricator

[Spike: 1 hour] The mobileaction URL toggle piece only sets a cookie on special pages.
Closed, ResolvedPublic

Description

When using the footer links to toggle between desktop and mobile view it will only set a cookie when on special pages. Meaning, if you are on an article a cookie will never get set. I assume this has to do with article caching.

This should be investigated to see where it applies, and if applicable, a new task should be created to fix it depending on impact.

Reproduction steps:
Format not sticking:
1.) Browse to an article on a desktop. Main_Page will work.
2.) Click "Mobile view"
3.) Note in the browser's inspector that a mf_useformat cookie does not get set.
4.) Clicking to any other article results in being sent back to desktop view.

Format sticking:
1.) Browse to an special page on a desktop. Special:Preferences will work.
2.) Click "Mobile view"
3.) Note in the browser's inspector that a mf_useformat cookie does get set.
4.) Clicking to any other article or special page results in being staying in the selected mobile view.

Settings:
$wgMFAutodetectMobileView = true;
$wgMobileUrlTemplate = "";
$wgMFVaryOnUA = false;
$wgMFShowMobileViewToTablets = true;

Affects: REL1_26 and REL1_27

Event Timeline

Alexia created this task.Aug 15 2016, 7:47 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptAug 15 2016, 7:47 PM
dr0ptp4kt renamed this task from The mobileaction URL toggle piece only sets a cookie on special pages. to [Spike: 1 hour] The mobileaction URL toggle piece only sets a cookie on special pages..Aug 17 2016, 3:38 PM
dr0ptp4kt triaged this task as Normal priority.
dr0ptp4kt added a project: Spike.
dr0ptp4kt updated the task description. (Show Details)
dr0ptp4kt moved this task from Needs Analysis to Triaged but Future on the Readers-Web-Backlog board.
Jdlrobson closed this task as Resolved.Apr 17 2017, 8:12 PM
Jdlrobson claimed this task.
Jdlrobson added a subscriber: Jdlrobson.

I took a pass at trying to replicate this using current master. I spent about 30 minutes trying to replicate using the config without any success.

In both steps I see Set-Cookie:mf_useformat=true; expires=Wed, 17-May-2017 20:01:16 GMT; Max-Age=2592000; path=/

It may be an older issue on REL1_26 and 27.

I'm going to say this is resolved for the time being but if there's any new information about this bug please do share it and reopen so we can reconsider.

The following should help: