Page MenuHomePhabricator

De-duplicated TemplateStyles missing when editing a section in visual section editing
Closed, ResolvedPublic

Description

De-duplicated TemplateStyles are missing when editing a section in visual section editing.

Steps to reproduce:

  1. Visit https://wikitech.wikimedia.org/wiki/Deployments
  2. Edit any section other than the first one

image.png (2×3 px, 525 KB)

The templates (used to render each section) look differently than in read mode. It turns out that this is because when a template is used multiple times, its TemplateStyles are only attached to the first occurrence, and in this case that occurrence is in a hidden section.
image.png (2×3 px, 476 KB)

After making any changes to a template, the expected styles appear for all templates:
image.png (2×3 px, 524 KB)

Event Timeline

Change 751453 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):

[mediawiki/extensions/VisualEditor@master] Re-duplicate deduplicated TemplateStyles

https://gerrit.wikimedia.org/r/751453

Change 751453 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Re-duplicate deduplicated TemplateStyles

https://gerrit.wikimedia.org/r/751453

Change 756005 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):

[mediawiki/extensions/VisualEditor@master] Revert \"Re-duplicate deduplicated TemplateStyles\"

https://gerrit.wikimedia.org/r/756005

Change 756066 had a related patch set uploaded (by Brennen Bearnes; author: Bartosz Dziewoński):

[mediawiki/extensions/VisualEditor@wmf/1.38.0-wmf.18] Revert \"Re-duplicate deduplicated TemplateStyles\"

https://gerrit.wikimedia.org/r/756066

Change 756005 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Revert \"Re-duplicate deduplicated TemplateStyles\"

https://gerrit.wikimedia.org/r/756005

Change 756066 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@wmf/1.38.0-wmf.18] Revert \"Re-duplicate deduplicated TemplateStyles\"

https://gerrit.wikimedia.org/r/756066

Mentioned in SAL (#wikimedia-operations) [2022-01-21T21:38:56Z] <brennen@deploy1002> Synchronized php-1.38.0-wmf.18/extensions/VisualEditor/modules/ve-mw: Backport: [[gerrit:756066|Revert "Re-duplicate deduplicated TemplateStyles" (T287675 T299251 T299767)]] (duration: 00m 49s)

Change 756682 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):

[mediawiki/extensions/VisualEditor@master] Re-apply \"Re-duplicate deduplicated TemplateStyles\"

https://gerrit.wikimedia.org/r/756682

Change 756682 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Re-apply \"Re-duplicate deduplicated TemplateStyles\"

https://gerrit.wikimedia.org/r/756682

Fixed: Template styles are intact through section editing.
See:

Screenshot 2022-02-07 at 18.57.33.png (1×3 px, 236 KB)