Flags have incorrect order for anonymous users

Created on 10 October 2024, about 2 months ago

Problem/Motivation

The OpenCulturas Custom module adds pseudo-flag items to entity views, so that anonymous users can also use that feature after logging in.
These items don't have a #weight key and therefore might lose their position when mixed with other elements. This happened to us when we added bookmark flags to several teaser displays.

Steps to reproduce

  • Configure the location teaser view display to show the sub type first, then the bookmark flag.
  • View such a teaser with an authenticated user; the order of those fields is correct.
  • Log out and reload; the bookmark flag jumps to the first position, due to an empty #weight.

Proposed resolution

When creating the pseudo elements, copy the original #weight values.

🐛 Bug report
Status

Active

Version

2.3

Component

User interface

Created by

🇩🇪Germany mrshowerman Munich

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

Comments & Activities

Production build 0.71.5 2024