Page MenuHomePhabricator

SPIKE: Empty ToC space in Vector 2022 special pages layout
Open, MediumPublicBUG REPORT


Discovered today on Vector 2022 master branch, there appears to be a blank space where the ToC would be on Vector 2022 special pages.

Screen Shot 2023-01-24 at 6.47.25 PM.png (1×3 px, 905 KB)

By checking out git commits in Vector one-by-one, a related change was introduced in on January 13, with Table of contents elements should not be rendered where none available (which sounds like it should prevent this very problem).

Somehow this has only appeared recently and does not affect production. Potentially could be a core change that changes the value of the data-toc array from null to an empty array (guessing).

The following patch explicitly sets null on the ToC array and fixes this issue:

Developer notes

The CSS issue is due to a missing class "vector-sidebar-container-no-toc", which is set when data-toc evaluates to false in mustache.

Event Timeline

Change 883289 had a related patch set uploaded (by Jdrewniak; author: Bernard Wang):

[mediawiki/skins/Vector@master] Override parent template data if component is null

(for now) I can't replicate this in production or locally, so I think we should spend some more time understanding this bug.

Setting it explicitly to null should not be necessary and could indicate some kind of breaking change in the TemplateParser or associated library.

@Jdrewniak when you see this locally, what value is being set for data-toc without this patch for you?

ovasileva triaged this task as Medium priority.Mon, Jan 30, 4:06 PM
ovasileva renamed this task from Empty ToC space in Vector 2022 special pages layout to SPIKE: Empty ToC space in Vector 2022 special pages layout.Mon, Jan 30, 6:43 PM

@Jdrewniak I still can't replicate this. Suggesting we punt this to sprint 4 for now. Please update before Thursday estimation meeting if you think we should be getting this ready for sprint 3.