Problem/Motivation

Deleting an Entityqueue does not remove dependency recorded in a Views configuration or related blocks, forcing removal of the View in its entireity

Steps to reproduce

  1. Create a View with no association whatsoever to entityqueue, e.g., a simple list of content, with both a page and block display.
  2. Add an Entityqueue referencing the same content, and add some nodes to the list(s). I have tested this with both simple queues and subqueues.
  3. Add a new View display to the View, e.g., another page, overriding the base (in an attempt to not affect any other displays), to sort the new display based on the queue:
    • Add a Relationship to the queue
    • Add a sort criterion for position in the queue
  4. Verify that the new display is correct.
  5. Delete the Entityqueue-related display from the View, in principle returning it to its original state before the addition of the Entityqueue dependency.
    • I have cleared the caches after this step, with no affect on the observed results.
    • I have found that saving the View a second time, after clearing caches, will remove the dependency.
  6. Delete the Entityqueue

At this point, the "Are you sure?"confirmation page will warn you that both the View and the Block configuration will be deleted, and they will, causing you to lose the entire View and Block, which should have no relationship/dependency on Entityqueue whatsoever. I have noted (from a drush cex), that the View's configuration retains entityqueue and the specific queue as dependencies.

Proposed resolution

Entityqueue should do a better job of of cleaning up after itself. (I could see this being the fault of Views, except that I've never seen such behavior for the removal of other entities that were formerly associated with a View.)

Remaining tasks

User interface changes

API changes

Data model changes

Comments

msypes created an issue. See original summary.

mmaldonado’s picture

I have the same issue, I think the solution is that it is not checked if the relationship is being used in views so that the view cannot be removed.

thalemn’s picture

I just discovered this issue, too. I have a number of views that were deleted when I uninstalled entityqueue, however none of the views had a dependency on entityqueues.

amateescu’s picture

Version: 8.x-1.1 » 8.x-1.x-dev
Status: Active » Closed (duplicate)
Issue tags: -views
Related issues: +#3229138: When a view display is deleted, the dependencies list is not updated properly