Needs review
Project:
Weight
Version:
8.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
28 Mar 2024 at 14:59 UTC
Updated:
28 Mar 2024 at 16:59 UTC
Jump to comment: Most recent
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)
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.
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