Page MenuHomePhabricator

Vue ZHtmlFragment component fails when setting the value of a badly initialized value
Closed, ResolvedPublicBUG REPORT

Description

Description

This can happen with any object, we have just happened to notice it with the Html fragment one, which has a builtin component.

When type A uses type B, and type B uses type C

  • We request type A with dependencies, which brings B
  • When we request type B with dependencies, because B is already fetched, we don't get C
  • When we build an object with C, we don't know its keys, so we build it blank.

This can happen, as demonstrated in the fact that Denny could build this using the UI:

https://www.wikifunctions.org/view/en/Z801?call=%7B%22Z1K1%22%3A%22Z7%22%2C%22Z7K1%22%3A%22Z801%22%2C%22Z801K1%22%3A%7B%22Z1K1%22%3A%22Z36462%22%2C%22Z36462K1%22%3A%22Z1002%22%2C%22Z36462K2%22%3A%7B%22Z1K1%22%3A%22Z6091%22%2C%22Z6091K1%22%3A%22Q1084%22%7D%2C%22Z36462K3%22%3A%5B%22Z6091%22%5D%2C%22Z36462K4%22%3A%5B%22Z36463%22%2C%7B%22Z1K1%22%3A%22Z36463%22%2C%22Z36463K1%22%3A%5B%22Z6091%22%2C%7B%22Z1K1%22%3A%22Z6091%22%2C%22Z6091K1%22%3A%22Q110786%22%7D%5D%2C%22Z36463K2%22%3A%7B%22Z1K1%22%3A%22Z89%22%7D%7D%2C%7B%22Z1K1%22%3A%22Z36463%22%2C%22Z36463K1%22%3A%5B%22Z6091%22%2C%7B%22Z1K1%22%3A%22Z6091%22%2C%22Z6091K1%22%3A%22Q146786%22%7D%5D%2C%22Z36463K2%22%3A%7B%22Z1K1%22%3A%22Z89%22%7D%7D%5D%7D%7D

Notice this has empty HTML objects such as:

{ "Z1K1": "Z89" }

Which indicates that they were created when Z89 had not been fetched

Things we can do

  • prefetch Z89: only helps with Z89
  • setValue contemplating that Z89K1 can be missing: only helps with Z89
  • wait for fetchZids to come in the factory object creation: this shouldn't mean a lot of extra wait, as most of things would have been prefetched already, but at least we wouldn't miss in such cases.

Completion checklist

Event Timeline

gengh renamed this task from Vue ZHtmlFragment component fails when setting the value of a badly initialized bad object to Vue ZHtmlFragment component fails when setting the value of a badly initialized value.

Maybe both (a) as Z89 is going to be commonly used, and (c) as the proper fix?

Change #1303378 had a related patch set uploaded (by Genoveva Galarza; author: Genoveva Galarza):

[mediawiki/extensions/WikiLambda@master] Improve dependency extraction both in Api and in library.js fetcher

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

Jdforrester-WMF changed the task status from Open to In Progress.Jun 17 2026, 1:45 PM
Jdforrester-WMF assigned this task to gengh.
Jdforrester-WMF triaged this task as Medium priority.

Change #1303378 merged by jenkins-bot:

[mediawiki/extensions/WikiLambda@master] Improve dependency extraction both in Api and in library.js fetcher

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