Problem/Motivation

Split from #2794431-121: [META] Formalize translations support.

ResourceObject is not language-aware which in turn causes caching issues.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

None

API changes

Data model changes

Release notes snippet

Issue fork drupal-3199696

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

plach created an issue. See original summary.

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

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

wim leers’s picture

@bbrala This should be relatively straightforward and would unblock #2794431: [META] Formalize translations support, maybe we can get this going again? :)

bbrala made their first commit to this issue’s fork.

bbrala’s picture

Adding plach for original core. Adding gabesullice for review of code both in #2794431: [META] Formalize translations support

bbrala’s picture

Status: Active » Needs review

Not too sure if this is the time to start testing this. Also, not sure we should go about that.

bbrala’s picture

Status: Needs review » Needs work
bbrala’s picture

Status: Needs work » Needs review

Appearantly i forgot to change the expected cache tag for the NodeTest. It should now expect the node's language as part of the cache tag :)

wim leers’s picture

Status: Needs review » Needs work

Looking very promising! 👍

bbrala’s picture

I've addressed all feedback, only one question left regarding the comment/@see target.

Also i've rebased onto 9.3.x, that was a while back.

bbrala’s picture

Credit @Wim Leers for review.

bbrala’s picture

Status: Needs work » Needs review
bbrala’s picture

(note: if you comment on the issue your avatar will become visible here ;))

yogeshmpawar made their first commit to this issue’s fork.

bbrala’s picture

Was that a random rebase? Seems a bit unneeded perhaps? :)

yogeshmpawar’s picture

yes @bbrala, it was a random rebase.

bradjones1’s picture

Status: Needs review » Reviewed & tested by the community

This was split from the parent issue and does not address all issues regarding json:api support for translated content, but it does exactly what the IS says: make the ResourceObject value object language-aware. The existing test (in the context of a node) does not contain any new test coverage for language handling, merely it is extended to include the language ID in the cache keys.

For the narrow purposes for which this ticket is designed, this is RTBC. I only provided reviews on this issue.

bbrala’s picture

Thanks! Adding @bradjones1 to credits :)

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed f87303bf2d9 to 10.0.x and 797453145e0 to 9.4.x. Thanks!

This is pretty close to a bug but okay let's put this in as a task and roll on :)

+1 for #3252424: Follow-up: ResourceObjectNormalizationCacher should get tags from ResourceObject instead of building them

  • alexpott committed f87303b on 10.0.x
    Issue #3199696 by bbrala, Wim Leers, plach, bradjones1, gabesullice: Add...

  • alexpott committed 7974531 on 9.4.x
    Issue #3199696 by bbrala, Wim Leers, plach, bradjones1, gabesullice: Add...
bbrala’s picture

Thanks @alexpott! I'll put the follow-up in my backlog ;)

wim leers’s picture

WOOOT! 🥳

br0ken’s picture

Does it need a backport to 9.3.x?

Status: Fixed » Closed (fixed)

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