Page MenuHomePhabricator

Publishing in Section Translation is prevented with a "There is no section X" error message
Closed, ResolvedPublicBUG REPORT

Assigned To
Authored By
Pginer-WMF
Oct 29 2021, 1:10 PM

Description

When translating the "Rover and lander specifications" from the Curiosity (rover) article into Bengali on in Test Wiki and on Bengali Wikipedia (in Sandbox) publishing results in an error: "There is no section 11".

bn.m.wikipedia.org_w_index.php_title=Special_ContentTranslation&page=Curiosity%20(rover)&from=en&to=bn&sx=true(iPhone X).png (1×563 px, 195 KB)

Steps to reproduce are to follow any of the above links, translate the section title and initial sentence of the article (with some additional text to prevent unmodified MT to block publishing) and try to publish the result.

Event Timeline

Had the same issue for another section I tried to translate: "Orbit and rotation" from Mars article:

test.m.wikipedia.org_w_index.php_title=Special_ContentTranslation&page=Mars&from=en&to=bn&sx=true(iPhone X).png (1×563 px, 169 KB)

Pginer-WMF raised the priority of this task from High to Unbreak Now!.Oct 29 2021, 1:58 PM

The issue seems more general. Tried with the History section of Paneer and publishing was failing too:

test.m.wikipedia.org_w_index.php_title=Special_ContentTranslation&page=Paneer&from=en&to=bn&sx=true(iPhone 6_7_8).png (667×375 px, 136 KB)

Pginer-WMF renamed this task from Publishing is prevented with a "There is no section X" error message to Publishing in Section Translation is prevented with a "There is no section X" error message.Oct 29 2021, 1:58 PM

From my testing this issue can be consistantly reproduced if the target is your personal sandbox and not real main content namespace. I tried publishing to page under my username, got this error. Changed to main namespace, I was able to publish.

May be this is an oversight in our testing and publishing logic? The article does not exist under your username and the section does not exist error make sense. @ngkountas ?

Change 735982 had a related patch set uploaded (by Nik Gkountas; author: Nik Gkountas):

[mediawiki/extensions/ContentTranslation@master] SX Publishing: Fix publishing to sandbox

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

Change 735982 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] SX Publishing: Fix publishing to sandbox

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

Change 737354 had a related patch set uploaded (by Santhosh; author: Santhosh):

[mediawiki/extensions/ContentTranslation@master] CX3 Build 0.1.0+20211108

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

From my testing this issue can be consistantly reproduced if the target is your personal sandbox and not real main content namespace.

I experienced issues and the sandbox option was not selected. I was trying to translate from English to Bengali the "Rover and lander specifications" section from the "Curiosity (rover)" article in test wiki and the labs instance:

Screenshot 2021-11-10 at 09.28.41 2.png (744×1 px, 489 KB)

Are the above patchsets expected to fix this too? If not, it may be worth it to consider these cases since it limits our ability to test the tool.

Change 737354 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] CX3 Build 0.1.0+20211108

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

A Bashkir editor has reported this same problem while testing the Section translation tool. I tried translating the same article, "Molecule, " from English to Bashkir and confirmed that this problem still exists.

Screenshot_2021-11-26-15-45-23-56_40deb401b9ffe8e1df2f1cc5ba480b12.jpg (2×1 px, 117 KB)
Screenshot_2021-11-26-15-50-50-95_40deb401b9ffe8e1df2f1cc5ba480b12.jpg (2×1 px, 91 KB)
Screenshot_2021-11-26-15-50-52-26_40deb401b9ffe8e1df2f1cc5ba480b12.jpg (2×1 px, 83 KB)
Screenshot_2021-11-26-15-50-20-68_40deb401b9ffe8e1df2f1cc5ba480b12.jpg (2×1 px, 128 KB)

The thing is, the problem does happen to some articles when translating from English to Bashkir and not all of them.

Pginer-WMF lowered the priority of this task from Unbreak Now! to High.Dec 2 2021, 1:35 PM

Based on recent discussion it seems that this is an issue only on the test instances, and we can just set ContentTranslationContentImportForSectionTranslation configuration parameter to true for these wikis and the problem will be solved.
@KartikMistry would it be possible to have such parameter to true for test wikipedia but remain as false for the production Wikipedias (Bengali Wikipedia, Thai Wikipedia, etc.)?

Based on recent discussion it seems that this is an issue only on the test instances, and we can just set ContentTranslationContentImportForSectionTranslation configuration parameter to true for these wikis and the problem will be solved.
@KartikMistry would it be possible to have such parameter to true for test wikipedia but remain as false for the production Wikipedias (Bengali Wikipedia, Thai Wikipedia, etc.)?

Yes. We can set this. @ngkountas Is this proper way or should we need to fix anything else?

Based on recent discussion it seems that this is an issue only on the test instances, and we can just set ContentTranslationContentImportForSectionTranslation configuration parameter to true for these wikis and the problem will be solved.
@KartikMistry would it be possible to have such parameter to true for test wikipedia but remain as false for the production Wikipedias (Bengali Wikipedia, Thai Wikipedia, etc.)?

Yes. We can set this. @ngkountas Is this proper way or should we need to fix anything else?

My understanding is that we can just set this property to "yes" as long as we do it only for the test instances. In those publishing is not working already, so I think it can only improve the situation. So I'd recommend to go ahead with the change, but making sure it is not affecting production wikis.

Change 747794 had a related patch set uploaded (by KartikMistry; author: KartikMistry):

[operations/mediawiki-config@master] Set ContentTranslationContentImportForSectionTranslation for SX

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

Coming here cause I have a similar message: There is no section 10 in revision 22457668.. It shows up when editing with VisualEditor the wikicode of the section https://meta.wikimedia.org/wiki/Communications/Research/Diversity,_equity,_and_inclusion_research/United_States_-_2021?veaction=editsource&section=10#Editors

The section wikicode looks like:

<translate>== Editors == <!--T:78--></translate>

<translate><!--T:79--> In 2020, the Global Data & Insights team surveyed our editors. The findings from the 2020 Community Insights survey correlate with our Diversity, equity, and inclusion communications research.</translate>
...

I am using it from desktop, not the mobile version.

I am using it from desktop, not the mobile version.

This task is about a completely different extension. Your issue is most likely related to https://meta.wikimedia.org/w/index.php?title=Meta_talk:Babylon&diff=0&oldid=22424722 and T261181: Make Translate extension compatible with Parsoid.

@hashar's bug actually seems related to T60946: <translate> in front of section header confuses section editing and T296412: Rendering difference between legacy and Parsoid with <translate> tags around a heading -- the <translate> tags interfere with the start-of-line context for the heading, and as a result section numbering is affected.

That said, it would be nicer to tweak things to, at least, have a better error message here. @isabelle is going to look at adding a lint for this case. If the underlying issue is that sometimes Parsoid and core have different ideas about section numbering -- something we've tried hard to eliminate but which has enough corner cases that things sneak through, ie T213468, T215628, T214538 and this bug -- then it would be better to adjust the VE code to only use a single "source of truth" for section numbering to nip this problem in the bud.

Change 747794 merged by jenkins-bot:

[operations/mediawiki-config@master] Set ContentTranslationContentImportForSectionTranslation for SX

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

Mentioned in SAL (#wikimedia-operations) [2022-01-03T12:14:59Z] <kartik@deploy1002> Synchronized wmf-config/InitialiseSettings.php: Config: [[gerrit:747794|Set ContentTranslationContentImportForSectionTranslation for SX (T294642)]] (duration: 00m 59s)

When I tried, publishing worked in Bengali Wikipedia (sandbox);

However, it showed an "edit conflict" error when I tried to publish on test wiki (main namespace):

test.m.wikipedia.org_w_index.php_title=Special_ContentTranslation&page=Curiosity%20(rover)&section=Rover%20and%20lander%20specifications&from=en&to=bn&sx=true(iPhone SE) (1).png (1×750 px, 180 KB)

@ngkountas Do we expect this to be related or would be better to investigate on a separate ticket?

@Pginer-WMF I confirmed that publishing in sandbox works with multiple tests, both in test and bn wiki. The issue about the edit conflict should have nothing to do with this issue, so I would suggest to consider this task done and create a new task to investigate this conflict.

Pginer-WMF claimed this task.

Thanks for the input @ngkountas. I tried and failed to reproduce the issue mentioned before. If the issue happens again, I'll create a follow-up.

This seems to reappear while trying to publish a section (Personal life, from the article Sanat Mehta) to Gujarati Wikipedia (guwiki):

Screenshot_20220519-162251.jpg (3×1 px, 335 KB)