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
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
Comment #3
igoragatti commentedChanged from where the langcode is picked. Used node_field_data_langcode instead of node__{{field_name}}_langcode