Preserve filter order when automatically updating the display options

Created on 14 February 2025, 24 days ago

Problem/Motivation

The function _views_core_entity_reference_update_as_a_reference just uses unset to remove the old filter and the PHP array bracket syntax to add the new filter. This causes all new filters to be appended at the end of the filter configuration. This possibly makes unnecessary changes to the file and a code review harder.

Steps to reproduce

  • Have a filter configuration in which the _target_id_reference filter is not at the end of the list.
  • Install this module and export the configuration.
  • Scratch your head at the changes in your view configuration.

Proposed resolution

Preserve the order when updating the filters.

Remaining tasks

  • Implement solution
  • Implement test
Feature request
Status

Active

Version

1.0

Component

Code

Created by

🇩🇪Germany tgauges

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024