Problem/Motivation

Steps to reproduce

Create a few nodes
Translate them to another language
Add the weight field to them
Create the view.
Sort them in default language (should work)
Sort them in translated language (weights are not updated)

Proposed resolution

Change `$entity->getEntityTypeId() . '__' . $this->field . '_langcode';`
to `$entity->getEntityTypeId() . '_field_data_langcode';`

This way if the field doesn't have a value yet it will set the value for the new weight in this translation.

Issue fork weight-3436781

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

igoragatti created an issue. See original summary.

igoragatti’s picture

Status: Active » Needs review

Changed from where the langcode is picked. Used node_field_data_langcode instead of node__{{field_name}}_langcode