template_preprocess_views_view_summary_unformatted() does not set active link when using AJAX

Created on 17 May 2023, almost 2 years ago

Problem/Motivation

template_preprocess_views_view_summary_unformatted() tries to determine the active link based on the <current> route.
But when using AJAX, the current route is /views/ajax so no active link is set.

Steps to reproduce

  1. Create a view displaying a summary.
  2. Enable AJAX on this view.
  3. Trigger an AJAX request.
  4. No active link is set.

Proposed resolution

\Drupal::service('path.current')->getPath() seems to get the current path correctly even in AJAX requests.

πŸ› Bug report
Status

Active

Version

9.5

Component
ViewsΒ  β†’

Last updated about 10 hours ago

Created by

πŸ‡«πŸ‡·France prudloff Lille

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