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

Views shows all results instead of topmost

$
0
0

Problem/Motivation

After upgrading to 9.5.1, the views on my site are out of whack.

Structure, working fine until 9.5.1:
A view of a list of IDs, sorted descending, showing only the topmost result, adding 1 using twig in a global text field. This mimicked "show next ID to use". F.e.: There are records with ID 917, 918, 920 in the database. The view lists only the first result (920), adds 1 and displays "next ID to use: 921.

This still works fine with 9.5.1, but when this views-block gets called in a global views reference in the footer line of another view, ALL existing IDs get displayed, with one added to the value.

This is confusing for my users, to say the least, and I have yet to find a workaround for this sick behaviour. Views "max value" didn't work for me in the past, maybe it's the way to go now.

Steps to reproduce

It's easy. Just try it for yourself.

Additional information

With 9.5.0, the very view showed an error whenever called from the menu. The error read

Warning: Trying to access array offset on value of type null in Drupal\views\Plugin\views\display\EntityReference->query() (Zeile 195 in /var/www/web2/htdocs/9/web/core/modules/views/src/Plugin/views/display/EntityReference.php)

When the page was refreshed, the error vanished. This behaviour got solved with 9.5.1, but now the single "next ID" shows as a list.


Viewing all articles
Browse latest Browse all 296534

Trending Articles



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