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.

Both the text and the Category are generated twice.

Event Timeline

Eptalon created this task.Aug 17 2018, 8:26 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptAug 17 2018, 8:26 PM

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]]

Arrbee moved this task from Check & Move to Bugs on the ContentTranslation board.Aug 20 2018, 2:25 PM

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.

Pginer-WMF triaged this task as High priority.Aug 27 2018, 11:27 AM
Pginer-WMF moved this task from Backlog to Priority backlog on the Language-2018-July-September board.

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.

CX2 did not show any hidden categories for adaptation as well

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:

Uncaught TypeError: Cannot read property 'emit' of null

This is addressed in https://gerrit.wikimedia.org/r/c/mediawiki/extensions/ContentTranslation/+/462422

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 closed this task as Resolved.Oct 4 2018, 11:46 PM
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).