Issue Bug Closed

#92751Localization wizard hangs

Dmitry Dulepov 11/02/20, 16:46 updated 12/22/20, 11:03

Description

Steps to reproduce:

  • Create a content element on the page
  • Localize that content element to another language
  • Create another content element in the same column below the first one
  • Change the first content element to language “All”
  • Press translate button in the Page module

Expected result:

  • You can translate the second element

Actual result:

  • Source language selection does not appear
  • List of records to localize does not appear
  • Clicking “Next” makes the window display spinning indicator forever

The cause

  • Query in LocalizationRepository::fetchOriginLanguage will fetch two languages: -1 and 0. The first one will be returned: -1
  • Since -1 is not localizable, it will be skipped, so there will be no source language to translate from
  • Since there is no source language, there will be no records to translate
  • The system does not expect to have a translation window when there is nothing to translate and will display the spinning wheel forever

Proposed fixes:

  • Changing language to -1 should delete all translations of the record
  • LocalizationRepository::fetchOriginLanguage should ignore language -1

Reviews 3