Steps to replicate the issue (include links if applicable):
- Enable gadget that is using mw.util.addPortletLink.
- Open mobile page.
- No tab present.
What happens?:
This returns null:
... var id = 'ca-example'; var nextEditUrl = '#example'; var parentId = 'p-namespaces'; var item = mw.util.addPortletLink( parentId, nextEditUrl, ">ᵉ", id, 'Edytuj następną', 'd', '#ca-nstab-page' );
See real code: https://pl.wikisource.org/wiki/MediaWiki:Gadget-EditNext.js
What should have happened instead?:
Add a portlet link with proper structure.
Software version (skip for WMF-hosted wikis like Wikipedia):
Other information (browser name/version, screenshots, etc.):
The tab on desktop:
QA
in beta cluster on mobile, make sure you are logged in and run
var id = 'ca-example'; var nextEditUrl = '#example'; var parentId = 'p-associated-pages'; var item = mw.util.addPortletLink( parentId, nextEditUrl, ">ᵉ", id, 'Edytuj następną', 'd', '#ca-nstab-page' );
and confirm a tab gets added
QA in production
- Go to https://ca.wikipedia.org/wiki/Especial:Prefer%C3%A8ncies#mw-prefsection-gadgets and enable DocTabs
- Visit https://ca.wikipedia.org/wiki/Plantilla:Infobox and check a tab adds on desktop
- Switch to mobile and confirm the same tab is added.
QA Results - Beta
| AC | Status | Details |
|---|---|---|
| 1 | ✅ | T340728#9434004 |
QA Results - Prod
| AC | Status | Details |
|---|---|---|
| 1 | ✅ | T340728#9448710 |
| 1 | ✅ | T340728#9448710 |


