Page MenuHomePhabricator

Rendered HTML of embedded Functions does not show anything in the VE preview in some cases
Closed, ResolvedPublicBUG REPORT

Description

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

  • go to any German noun on hr.wiktionary that doesn't have a declination table yet, e.g. https://hr.wiktionary.org/wiki/Antonym
  • click on "Uredi" (edit) (i.e. go to the Visual Editor)
  • click on "Umetni" (Insert)
  • click on "Više" (more)
  • click on "Funkcija" (Function)
  • search for Z29055 ("tablica deklinacije Njemačke imenice na desnoj")
  • for the lexeme ID, choose the Lexeme of this page (e.g. "Antonym", L486846)
  • click the box "Use this page's default language"
  • click on "Pretpregled" (preview)

What happens?:
A spinning wheel appears, but then no result is shown

If the "Show rendered" Button is switched off, it does show the right HTML:

<div style="float:right"><table class="wikitable"><caption>das Antonym</caption><tr><th>Padež</th><th>Jednina</th><th>Množina</th></tr><tr><th>Nominativ</th><td>das Antonym</td><td>die Antonyme</td></tr><tr><th>Genitiv</th><td>des Antonyms</td><td>der Antonyme</td></tr><tr><th>Dativ</th><td>dem Antonym</td><td>den Antonymen</td></tr><tr><th>Akuzativ</th><td>das Antonym</td><td>die Antonyme</td></tr></table></div>

What should have happened instead?:
It should show the preview, i.e. the table with the declinations

Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):

Other information (browser name/version, screenshots, etc.):
A video for is here:

Event Timeline

Jdforrester-WMF renamed this task from Rendered HTML preview when embedding Functions does not show anything in some cases to Rendered HTML of embedded Functions does not show anything in the VE preview in some cases.May 13 2026, 4:41 PM
Jdforrester-WMF triaged this task as Medium priority.

@DVrandecic can you help me out. All I am seeing is:

Screenshot 2026-06-03 at 13.42.28.png (1,978×1,848 px, 322 KB)

EDIT: ah ?veaction=edit

This comment was removed by DSmit-WMF.
This comment was removed by DSmit-WMF.
DSmit-WMF changed the task status from Open to In Progress.Jun 3 2026, 12:57 PM
DSmit-WMF claimed this task.

Change #1297138 had a related patch set uploaded (by Daphne Smit; author: Daphne Smit):

[mediawiki/extensions/WikiLambda@master] zhtml store: don't cache failed sanitiser requests

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

Its not ready to deploy. this is a related fix but is not fixing the root cause. as mentioned in the patch commit.

Change #1297138 merged by jenkins-bot:

[mediawiki/extensions/WikiLambda@master] zhtml store: don't cache failed sanitiser requests

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

Ok removed my previous comments, they were not correct. I did debug and found the following:

apiUtils.sanitiseHtmlFragment throws because postWithEditToken doesnt work on a wiktionary:

{
    "batchcomplete": "",
    "warnings": {
        "tokens": {
            "*": "Tokens may not be obtained when the same-origin policy is not applied."
        }
    }
}

Change #1297646 had a related patch set uploaded (by Daphne Smit; author: Daphne Smit):

[mediawiki/extensions/WikiLambda@master] sanitiser API: run on local wiki to keep CSRF cross-origin-safe

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

Change #1297646 merged by jenkins-bot:

[mediawiki/extensions/WikiLambda@master] sanitiser API: run on local wiki to keep CSRF cross-origin-safe

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