- Issue created by @vegardjo
- 🇷🇴Romania amateescu
I've tried to reproduce this quickly by putting this code in a template, and the output was correct, trashed nodes were not displayed:
{% if drupal_view_result('frontpage', 'page_1') is not empty %} <h2 class="section-heading">Publications</h2> {{ drupal_view('frontpage', 'page_1') }} {% endif %}
Does your view have a filter on the
deleted
field? Because that's the only way to bypass Trash's Views query alter, see https://git.drupalcode.org/project/trash/-/blob/3.x/src/ViewsQueryAlter.... - 🇳🇴Norway vegardjo
Thanks for checking it out! I uninstalled Trash on this site, but I'll try to find some time to reproduce it fresh.
It is a view of "publications", with a relation to "project, via a field on publication". Then there is a contextual filter for node.id, which is what you see in my twig code. Basically it is a view of publication nodes related to a project, shown on a project node, but where the reference is publication -> project: There are no other filters beside published and content type.