Page MenuHomePhabricator

“There is no section 1.” error when publishing a section translation
Closed, ResolvedPublicBUG REPORT

Description

List of steps to reproduce (step by step, including full links if applicable):

What happens?:

After pressing “Publish”, it gets "Publishing failed" and in the Confirm translation dashboard is shown a "There is no section 1. "error message.

What should have happened instead?:

After pressing the publish button, it must be published the section translated.

Screenshot

Screenshot_20210503-124330-1.jpg (1×720 px, 161 KB)

Event Timeline

I saw that this issue is still occuring to me in mobile as in desktop, @Aklapper, @Pginer-WMF. This is really a bug.

image.png (414×1 px, 35 KB)

@ngkountas, it seems there is an issue in the algorithm to find the place to insert new section. Can you please check?

@ngkountas, it seems there is an issue in the algorithm to find the place to insert new section. Can you please check?

In addition to fixing the algorithm, it would be great if a "defensive programming" approach can be applied so that in case the algorithm fails in the future it does not block publishing (it is preferred for the section to go to the end of the article rather than not being published).

@Pginer-WMF, @ngkountas: I saw that this error is also occuring on Bengali Wikipedia, at translating from english to Bengali

image.png (597×1 px, 153 KB)

@RodneyAraujo could you provide some more information(source language, article title, section title) to reproduce this issue on Bengali Wikipedia, please?

@Jpita could you validate that this issue exists in production wiki? I followed above link but was unable to replicate it.

I've found a different issue while investigating this one (will create a new ticket but will post here for investigation cause it might be related):

image.png (1×630 px, 120 KB)

  • once I click "apply" in the title, then the bottom buttons are blocked and the "loading gif" never finishes spinning

image.png (1×620 px, 117 KB)

  • the last call made was a "preflight" call, never saw this before
  • if I select an article with more content to translate, this issue doesn't happen, it seems to be related to the number of sentences/paragraphs
  • the last call made was a "preflight" call, never saw this before
  • if I select an article with more content to translate, this issue doesn't happen, it seems to be related to the number of sentences/paragraphs

Thanks for surfacing this @Jpita.
A first impression guess based on the comments above is that this could be connected to the process of pre-fetching the translation for the next piece of content.
Maybe the logic is trying to get the contents of the next non-existing paragraph. But some investigation from the engineers may help to clarify.

@Pginer-WMF since the latest issue @Jpita reported, is being tracked in a different ticket (T283513) and there is no other pending issue for this task, I think that this ticket is not relevant anymore and can be closed.

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

[mediawiki/extensions/ContentTranslation@master] SX: Fix calculation of section number for publishing and add tests

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

Change 699785 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] SX: Fix calculation of section number for publishing and add tests

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