Page MenuHomePhabricator

JS console full of errors on mediawiki.org in "API" namespace in Vector 2022
Open, Needs TriagePublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

What happens?:
"Element being observed is not in DOM" errors from sectionObserver.js with <h3>, <h4>, and <h5> elements.

image.png (761×766 px, 111 KB)

Other information (browser name/version, screenshots, etc.):
Chrome, Vector 2022 skin.

Event Timeline

Needs to be Vector (2022), so https://www.mediawiki.org/wiki/API:Query?useskin=vector2022 and then scroll down to trigger this.

Happens in FF too

Jack_who_built_the_house renamed this task from JS console full of errors on mediawiki.org in "API" namespace to JS console full of errors on mediawiki.org in "API" namespace in Vector 2022.Oct 11 2023, 7:56 PM
Jack_who_built_the_house updated the task description. (Show Details)
Jack_who_built_the_house updated the task description. (Show Details)
Jdlrobson subscribed.

I'm unable to replicate this myself as a logged in user but can replicate it as an anonymous user.
It doesn't appear to happen in safe mode. https://www.mediawiki.org/wiki/API:Query?useskin=vector-2022&safemode=1

The warning is coming from Vector 2022, and was intentionally added as part of T316037 to catch a known error state. It looks like this is caused by the following gadget: https://www.mediawiki.org/wiki/MediaWiki:Gadget-tabbedwindow.js which destructively alters the DOM in a way that breaks Vector's table of contents and possibly other code that relies on the DOM. The gadget should be updated to progressively enhance the page instead.

Wargo subscribed.

The only hook to fire update of watched heading's DOMs is ve.deactivationComplete.
Maybe it should be universal and VE should be modified to call the new hook?