- Issue created by @twod
- last update
about 1 year ago 5 pass - @twod opened merge request.
- Status changed to Needs review
about 1 year ago 11:14pm 10 October 2023 - πΈπͺSweden twod Sweden
Initial attempt at fixing this. My Views no longer crash and by default they only include non-deleted entities.
I'm not very used to altering Views queries so could use some help making sure this is correct.
I noted Trash does not modify entity queries if you tell them to look at all revisions, but I think it makes more sense to actually do this for Views.This could use some tests with revision based Views as well.
- last update
about 1 year ago 5 pass - π·π΄Romania amateescu
I've been going back and forth through this code for the past week, and in addition to the problem described in the issue summary, it also doesn't handle entity references very well: a filter on the
deleted
field might be added to the view on either the base (data) table or the revision (data) table of the referenced entity type, and we're currently not checking for the second case.Here's a patch based on the MR from #2 which fixes both problems and cleans up the class a little. I've done quite a bit of manual testing, but I'd love at least another confirmation if you have the time @TwoD.
I noted Trash does not modify entity queries if you tell them to look at all revisions, but I think it makes more sense to actually do this for Views.
I agree, and it makes sense to do the same for entity queries as well, but we'll need another issue for that.
- π·πΊRussia kala4ek π·πΊ Novosibirsk
amateescu β credited kala4ek β .
- π·π΄Romania amateescu
Transferring commit credit from π Views integrartion: using a relation to an entity with trash ebaled results in SQL error Closed: duplicate .
-
amateescu β
committed 66d62ca4 on 3.x authored by
TwoD β
Issue #3393095 by TwoD, amateescu, josebc, kala4ek: Trash breaks...
-
amateescu β
committed 66d62ca4 on 3.x authored by
TwoD β
- Status changed to Fixed
about 1 year ago 3:53pm 28 October 2023 - π·π΄Romania amateescu
Tested on a few more views and I'm comfortable enough with those changes, so committed and pushed to 3.x, thanks everyone!
Automatically closed - issue fixed for 2 weeks with no activity.