[beta6] Wrong pages variable in pager preprocess

Created on 22 January 2024, 11 months ago
Updated 5 February 2024, 11 months ago

Problem/Motivation

Reported by https://www.drupal.org/u/tomduf_eduscolSTI

This preprocess hook is modifying an unknow variables: $pages

function ui_suite_dsfr_preprocess_pager(array &$variables): void {
  if (!isset($variables["items"]["pages"])) {
    return;
  }
  $variables["items"]["pages"] = LinksSettingType::normalize($variables["items"]["pages"]);
  unset($pages[$variables["current"] - 1]["url"]);
}

Proposed resolution

Before fixing that, let's check what feature we missed because of this mistake, and what will be the impact

🐛 Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

🇫🇷France pdureau Paris

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

Comments & Activities

Production build 0.71.5 2024