Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 295813

template_preprocess_views_view_summary_unformatted() does not set active link when using AJAX

$
0
0

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.

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet


Viewing all articles
Browse latest Browse all 295813

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>