Closed (fixed)
Project:
Drupal core
Version:
8.8.x-dev
Component:
views.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
6 Feb 2019 at 10:17 UTC
Updated:
20 Apr 2020 at 11:19 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
kaszarobertComment #4
nisha_gupta commentedThis patch works for me. Need review
Comment #5
lendudeThis should use $this->messager
The early return would mean all the entities are not deleted, shouldn't we just skip the one we can't delete?
trailing whitespace
Also, this needs a test
Comment #6
ravi.shankar commentedHere I have tried to address comment #5.
Comment #7
emyu01 commentedHi, this is the error I got while trying to replicate
The patch 3030989-6.patch also did not have any effect on the error displayed.
Comment #8
lendudeI also see the error in #7, this is also what an automated test for this shows. Updated the IS to reflect the new error.
Here is a test and a new fix for this. No interdiff because this is a whole new approach.
Comment #10
emyu01 commentedPatch applied cleanly and works as expected.
Comment #11
catchIt looks like we don't have coverage for the case where multiple nodes are selected, and only one is deleted?
Comment #12
emyu01 commentedhello @catch,
Attached is an updated patch including interdiff fixing error when multiple nodes selected but one or more but not all are already deleted. Also fixed error when multiple nodes selected and all have already been deleted. Tests to cover both cases have been added too.
Comment #14
emyu01 commentedComment #15
emyu01 commentedPatch is re-attached for review.
Comment #17
lendudeThanks @emyu01, this fixes the new tests. The error only occurs when all nodes have been deleted. The current behaviour is that when you select one node and that node doesn't exist (but there are still other nodes), you get returned to the bulk form page without any messages.
Not sure if that is the best behaviour, but it is better than a warning.
Comment #18
emyu01 commentedGreat! thanks @Lendude.
Comment #19
emyu01 commentedPatch tested and looks all good.
Comment #24
catchCommitted c266bb6 and pushed to 9.1.x, and cherry-picked back to 8.8.x. Thanks!