The #contentSub element was emitted to the HTML code unconditionally until the recent software update (T311421's patch https://gerrit.wikimedia.org/r/c/mediawiki/skins/Vector/+/816844). Many gadgets and user scripts relied on it to prepend some information before the page content. However, since this week release of MediaWiki, Vector 2022 is the only desktop skin that emits it only if the <div> is not empty.
On enwiki, the #contentSub element is referred to over 14 thousand times in the User: and MediaWiki: namespaces, leading to possibly many issues and scripts not working properly.
One of affected scripts is which is available as gadget on some wikis https://www.wikidata.org/wiki/User:Yair_rand/WikidataInfo.js
Acceptance criteria
- We'll restore the contentSub element as a temporary workaround for the long term solution T316830.
- We will not guarantee it will look the same. Onus is on gadgets to update styles as necessary.
QA steps
- run the code `$('<div>hello world</div>').appendTo( '#contentSub' )` on the main page and any article page. Confirm you see the text hello world at the top of the page.
- Confirm no regressions are flagged on pixel https://pixel.wmcloud.org/ relating to the article title area.
QA Results - Beta
AC | Status | Details |
---|---|---|
1 | ✅ | T315639#8296492 |
2 | ✅ | T315639#8296492 |
QA Results - Prod
AC | Status | Details |
---|---|---|
1 | ✅ | T315639#8296489 |
2 | ⬜ | T315639#8296489 |