Page MenuHomePhabricator

Content translation: Problem with handling references...
Closed, ResolvedPublic

Description

When using Content translation (English -> Simple English), I end up wit ugly errors with referenmces, shown in red in the screenshot, The problem is that the text in red is actually generated in the wikitext, and not a result of parsing the current page.

Also note that [[Category:Pages with citations having redundant parameters]] is pushed twice, as well.

grafik.png (953×1 px, 174 KB)

Both the text and the Category are generated twice.

Event Timeline

The actual text that is generated is:
More than one of <code style="color:inherit; border:inherit; padding:inherit;">&#x7C;work=</code> and <code style="color:inherit; border:inherit; padding:inherit;">&#x7C;journal=</code> specified ([[Help:CS1 errors#redundant parameters|help]]); More than one of <code style="color:inherit; border:inherit; padding:inherit;">&#x7C;DOI=</code> and <code style="color:inherit; border:inherit; padding:inherit;">&#x7C;doi=</code> specified ([[Help:CS1 errors#redundant parameters|help]])
[[Category:Pages with citations having redundant parameters]]
[[Category:Pages with citations having redundant parameters]]

I tested this in CX2, and it took about one minute or more from clicking the publish button until the dialog that asks whether to override a page. After that this is what got generated: https://dev.translatewiki.net/wiki/Phantosmia – lots of duplicated and unexpected content there. This should be investigated further.

Using CX2, with cxserver at https://gerrit.wikimedia.org/r/c/mediawiki/services/cxserver/+/458780
I published the article Phantosmia from en to simple with MT engine as 'use source'. This is what I get. I don't see any issues.

image.png (3×1 px, 796 KB)

CX2 did not show any hidden categories for adaptation as well

image.png (315×1 px, 45 KB)

The page @Nikerabbit showed https://dev.translatewiki.net/wiki/Phantosmia is too much corrupted. Wonder why. Was there any js error while doing translation?

Can be closed if @Nikerabbit confirms the issue is not happening with CX2

@santhosh I checked the same translation English -> Simple English "Phantosmia" (http://cx2-testing.wmflabs.org/index.php/User:ET3/Phantosmia). I used the 'Use source text" option.

On ContentTranslation page there was the following error when I clicked to translate 'Reference' section:

jQuery.Deferred exception: model.getSectionNumber is not a function TypeError: model.getSectionNumber is not a function
    at VeInitMwCXTarget.

When I tired to insert Reference via VE, I got a different Console error:

Uncaught TypeError: Cannot read property 'emit' of null
    at VeCeCXTransclusionInlineNode.ve.ce.CXTransclusionInlineNode.afterRender 
    at VeCeCXTransclusionInlineNode.ve.ce.GeneratedContentNode.render 
    at VeCeCXTransclusionInlineNode.ve.ce.MWTransclusionNode.render 
    at VeCeCXTransclusionInlineNode.ve.ce.GeneratedContentNode.doneGenerating

The published Reference section looks as the following:

Screen Shot 2018-09-21 at 4.48.03 PM.png (654×1 px, 170 KB)

jQuery.Deferred exception: model.getSectionNumber is not a function TypeError: model.getSectionNumber is not a function at VeInitMwCXTarget.

I am not sure if the cause is the same, but I saw the same error in T205420: CXServer fails with HTTP 500: "MT processing error: undefined".

@santhosh - the problem is present in production now - testwiki (wmf.23). Only Basic references can be edited - clicking on the reference and then on 'Edit' does not open the editing box.

The Console displays the following errors:

Uncaught TypeError: Cannot read property 'getModel' of null

and

Uncaught TypeError: Cannot read property 'emit' of null
    at VeCeCXTransclusionInlineNode.ve.ce.CXTransclusionInlineNode.afterRender 
    at VeCeCXTransclusionInlineNode.ve.ce.GeneratedContentNode.render 
    at VeCeCXTransclusionInlineNode.ve.ce.MWTransclusionNode.render 
    at VeCeCXTransclusionInlineNode.ve.ce.GeneratedContentNode.doneGenerating
Etonkovidova claimed this task.

Re-checked with cx2 version - the publishing functionality for Reflist is limited in cx2-testing, but all generated markup for references is displayed correctly when all templates are available (for example in betalabs).

Screen Shot 2018-10-04 at 4.28.32 PM.png (156×1 px, 46 KB)