Node order is not retained after node update in multilingual

Created on 22 October 2020, over 4 years ago
Updated 7 November 2024, 3 months ago

Problem/Motivation

When editing a node, that node becomes first in the list on multilingual sites.

Steps to reproduce

Create a website with 2 or more languages. Create some translated terms. Create some translated nodes and assign each node to one of the translated terms.
Reorder the nodes.
Edit anything but the first node. Save that node. That node is now the first in the order.

Proposed resolution

Quickfix:
make sure the array used in the update hook has unique values (it contains the same term id multiple time, once for each language).
Fix in the long run:
make sure order is saved taking langcode into account. All the queries in NodeOrderManager should add langcode conditions in them since taxonomy-index table contains a langcode column.

Remaining tasks

None

User interface changes

None

API changes

None

Data model changes

None

🐛 Bug report
Status

Needs work

Version

3.0

Component

Code

Created by

🇧🇪Belgium kriboogh

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024