Problem/Motivation

If you install Content Translation, you get a pair of warnings if there's only one language.

This is a very weird thing to see during config sync, during which it can be presumed that you have only one language (plus Content Translation) for a reason. Indeed, content_translation_install() already returns early during site installation, probably for this reason exactly.

The fact that it doesn't also return early during config sync is likely an oversight.

Steps to reproduce

Apply a recipe that installs Content Translation on a monolingual site. Or, heck, sync config in such a way that Content Translation gets installed during the sync.

Proposed resolution

If $is_syncing is true, content_translation_install() should return early.

Issue fork drupal-3622031

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

phenaproxima created an issue. See original summary.

phenaproxima’s picture

This is explicitly a bug because, for Drupal CMS reasons, we're hoping this can be backported to 11.4.x.

gábor hojtsy’s picture

Looks good, I agree with this.

gábor hojtsy’s picture

Status: Active » Reviewed & tested by the community

We found this while working on the multilingual recipe for Drupal CMS. Thanks for the generic fix.

  • longwave committed de51a841 on 11.4.x
    fix: #3622031 Content Translation shows a confusing set of warnings even...

  • longwave committed e1fc6985 on 11.x
    fix: #3622031 Content Translation shows a confusing set of warnings even...

  • longwave committed 6e1ee72f on main
    fix: #3622031 Content Translation shows a confusing set of warnings even...
longwave’s picture

Version: main » 11.4.x-dev
Status: Reviewed & tested by the community » Fixed

Backported down to 11.4.x as an eligible bug fix. There was a minor merge conflict but I think I solved it correctly.

Committed and pushed to main, 11.x and 11.4.x. Thanks!.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.