Page MenuHomePhabricator

SkinTemplate template key 'mobileview' value is not initialized for desktop versions of special pages.
Closed, ResolvedPublic

Description

Author: questpc

Description:
I developed custom Vector-derived skin and made few tweaks to Minerva mobile skin. In Vector-derived skin I use $this->html('mobileview') in skin footer. It properly generates &mobileaction=toggle_view_mobile for "ordinary" pages but is not initialized for special pages. The cause is in MobileFrontendHooks::onSkinTemplateOutputPageBeforeExec hook, which skips generation of template variable for special pages:

if ( !$isSpecial && !$context->isBlacklistedPage() ) {
...
}

Is it impossible to switch special pages to Minerva skin or is that a bug? If that's impossible I'd tell the customer that the mobile switch link will be unavailable at special pages.


Version: unspecified
Severity: normal

Details

Reference
bz62436

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 2:54 AM
bzimport set Reference to bz62436.
bzimport added a subscriber: Unknown Object (MLST).

bingle-admin wrote:

Prioritization and scheduling of this bug is tracked on Mingle card https://wikimedia.mingle.thoughtworks.com/projects/mobile/cards/1755

questpc wrote:

I'd imagine that some special pages might be confused by &mobileaction=toggle_view_mobile parameter? In such case there should be a switch via dedicated specal page (something like Special:MobileFrontendSwitch) then redirecting to target special page.

Bug 58566 should fix this... are you running latest master or is the issue still present with the fix for that bug?

questpc wrote:

Updated to latest master and yes not 'mobileview' value is available when running special pages, however _mobile_ versions of special pages do not show &mobileaction=toggle_view_desktop. Mobile versions of "ordinary" pages do have such link in their footer.

Is that normal? I am too tired to investigate the reason.

questpc wrote:

and yes not 'mobileview' == and yes NOW 'mobileview' a typo. Sorry.

Yes, this is currently the case. We are trying to rectify this. If you append mobileaction=beta to the mobile pages you will see the new design we are working on which surfaces these on all pages.
You can follow progress on bug 56139
Thanks for giving us a much needed poke.

  • This bug has been marked as a duplicate of bug 56139 ***