Page MenuHomePhabricator

Content translation copied ref displayed as "undefined"
Closed, ResolvedPublicBUG REPORT

Description

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

  • Go to content translation and/or choose an article to translate from the source language to the target language
  • Start translating the text and copy some refs from the source text to the translated text (ctrl+c, ctrl+v)
  • Observe as some refs are marked as "undefined" while other refs are not copied properly (the "undefined" ref is copied instead)

What happens?:
As I translate a text in the Content Translation tool, I copy refs from the source text to the translated text. After copying multiple refs, one of them at least is marked as "undefined", while other refs I copied are not copied correctly, and instead display the same content as the "undefined" ref. I tried this multiple times with the same result. After I publish the article, I have to correct the refs using the original text, which can waste a decent amount of time.

What should have happened instead?:
Refs should be copied correctly, one by one, as is usually the case.

Other information (browser name/version, screenshots, etc.):

content translation copied ref appears undefined 7.png (1,894×566 px, 155 KB)

content translation copied ref appears undefined 3.png (1,114×454 px, 83 KB)

content translation copied ref appears undefined 5.png (1,878×572 px, 152 KB)

content translation copied ref appears undefined 6.png (1,878×580 px, 151 KB)

content translation copied ref appears undefined 4.png (1,128×448 px, 83 KB)

content translation copied ref appears undefined 2.png (1,116×424 px, 83 KB)

content translation copied ref appears undefined 1.png (758×366 px, 38 KB)

Event Timeline

I have encountered this issue as well; I've noticed that it also occurs when copying a citation from the content translation tool into the normal visual editor, so this might be a bug with the visual editor as a whole and not just with the content translation tool.

I'm informing you that the problem is the same as reported in this other task: T412486. This problem isn't just affecting translations from English to Portuguese; it's affecting other languages as well.

Chronus raised the priority of this task from Medium to High.Jan 15 2026, 9:09 PM

I believe the issue occurs when translating an article which uses {{reflist}} (or a local equivalent) instead of <references /> – presumably because ContentTranslate can't properly detect the references. I couldn't reproduce the bug in articles without such a template.

My experience is that the reference name plays a big part in this bug. All the references that have no name end up the same as the first one (the 'undefined' one). The named references are spared, they work well. It is true I only translated from the English Wikipedia, which employs the {{reflist}} template, but the ref name handling is the place to investigate, I think.

Restricted Application added a subscriber: alaa. · View Herald TranscriptFeb 8 2026, 2:47 PM

This bug has been fixed by recent work in T415770. I've tested the change in Special:ContentTranslation and can no longer reproduce the issue, therefore closing as resolved.