Problem/Motivation

Apparently, the issue of #3048699: Taxonomies are only displayed in English was actually a bug in Layout Builder #3051188: Translated content displays its taxonomy terms in the wrong language when layout builder is enabled for that content type and not something that needed fixing in Umami itself.

The way it was "resolved" was by allowing different taxonomy terms for each language.
Because of the way we are migrating content into Umami, it seems fine and it bypasses the bug in Layout Builder.

The current setup is wrong because if a recipe is tagged "Dessert", we want it to be tagged the same way in all languages (with the correct translation in each language), but we do not want it to be a separate/different taxonomy term.

Proposed resolution

After #3051188: Translated content displays its taxonomy terms in the wrong language when layout builder is enabled for that content type is resolved, revert the changes that were made in #3048699: Taxonomies are only displayed in English.

Comments

shaal created an issue. See original summary.

shaal’s picture

Version: 8.8.x-dev » 8.7.x-dev
Category: Feature request » Bug report
Status: Active » Needs review
StatusFileSize
new2.15 KB
new122.32 KB
new123.17 KB

Reverted commit d53ba183648e7459d6418a21236b099537d01339.

Testing http://drupal.ddev.local/es/recipes/bizcochos-veganos-de-chocolate-y-nueces.
After applying this patch, while #3051188: Translated content displays its taxonomy terms in the wrong language when layout builder is enabled for that content type is not fixed, we're getting the expected results:

When Layout Builder is enabled for Recipe pages, taxonomies are displayed in English (because of the bug #3051188: Translated content displays its taxonomy terms in the wrong language when layout builder is enabled for that content type):

When Layout Builder is disabled for Recipe pages: taxonomies are displayed in Spanish:

Version: 8.7.x-dev » 8.8.x-dev

Drupal 8.7.9 was released on November 6 and is the final full bugfix release for the Drupal 8.7.x series. Drupal 8.7.x will not receive any further development aside from security fixes. Sites should prepare to update to 8.8.0 on December 4, 2019. (Drupal 8.8.0-beta1 is available for testing.)

Bug reports should be targeted against the 8.8.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.9.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

shaal’s picture

Version: 8.8.x-dev » 8.9.x-dev
StatusFileSize
new441.4 KB

#2955392: EntityViewBuilder::viewField() does not respect entity current language when used with an entity reference field is now fixed (in Drupal 8.9.x and 9.0.x).
I tested this patch with the latest Drupal 8.9.x and it works as intended.

Screenshot from a Spanish recipe page:

This patch is very simple, it only changes the setting for categories to stay the same in all languages.
It's ready to be reviewed.
:)

We should bring this patch to Drupal 8.8.x after the patch mentioned above is merged into 8.8.x

berdir’s picture

This looks good to me, not sure if it makes sense to have a test? I think if we do add a test then it's more about the right configuration, meaning we should make sure that the field is untranslatable, which means it's only showing up when editing the default translation of an entity?

Version: 8.9.x-dev » 9.1.x-dev

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

markconroy’s picture

@Berdir @shaal is this ready to be marked RTBC (presuming the patch still applies after a year!).

markconroy’s picture

Status: Needs review » Reviewed & tested by the community

Patch applies cleanly. The site still works. Let's move to RTBC!

Thanks @shaal @Berdir for working on this (and the layout builder team for fixing the original issue).

  • lauriii committed f472c5e on 9.2.x
    Issue #3051465 by shaal, markconroy, Berdir: Revert "Taxonomies are only...
lauriii’s picture

Status: Reviewed & tested by the community » Fixed

Committed f8fd7e7 and pushed to 9.2.x. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.