By default, Nodequeue automatically creates a view for each queue.
If you don't disable this in the UI before you create the queues, you get a set of views which you might never use.
This is a nuisance in the list of views (small or large, depending how many queues/views).
You can't delete these from the Views side, because they're defined "in code" - the best you can do is disable them, and they remain zombies forever.
I can't see how to delete them from the Nodequeues side either.
I assume this could be added - please ?
At the least, this request could act as a record of why it won't or can't happen ?

If it's simple to do manually as a one-off, can someone point us to the details needed ?

Comments

jaydub’s picture

Not sure what you mean by 'zombies' as since they are 'in code' they aren't in the database. You can disable so don't think a full delete is required here. In fact when a View is defined in code you can't 'delete' it since it's always going to announce itself via hook_views_default_views calls.

jaydub’s picture

As was pointed out in #1422916: Make views optional nodequeue has a settings page option to disable the automatic View creation

go to /admin/structure/nodequeue/settings

rory.davies’s picture

Thanks jaydub.

Yes, you can prevent auto-creation of the view (as long as you remember to turn it off before creating the NQ).
If you have cases where a view is needed, and some where it's not, you could do a lot of toggling of the option.
In my case it seemed sensible to leave it on, then I found a case where I wanted to share a view between 2 NQs.

If you don't disable view creation, the "in code" view is listed in Views, even if you disable it. If you have a lot of these, they become a major part of the list of views. As they can't be removed from the list, and are never used (disabled), that's what I meant by zombies. They just "make the place untidy" or harder to maintain.
OK, perhaps we should have known better than to create them initially, but we're human and fallible. It would be good to remove the ones we didn't mean to create, or no longer need.

I don't know enough about Drupal to really understand what "in code" means. Whatever/wherever the "code" is, it was created (by NQ?), and I'd simplistically imagine it could be removed (by NQ or by Views).

So, is this feature possible at all ?

Or is there a workaround ?
For example is it removed when the associated NQ is removed ? I tried this, and I think it may work, in 2 steps :
1) Delete the associated NodeQueue (this removes the associated "in code" view)
2) If the view is still listed, "revert" it (this removes an "in database" copy created if you made any changes).

justin.koh’s picture

If you disable the "Automatically create one view per queue" option and clear cache, the views should go away.

rory.davies’s picture

Component: Miscellaneous » Documentation
Priority: Normal » Minor
Status: Active » Closed (fixed)

Thanks Justin, that seems to work as you say (at least for empty queues, I didn't test with populated ones).
I would not have thought of this being part of a cache.

I have updated the online docs (http://drupal.org/node/293117) to include this technique - I hope that's acceptable, as I'm new to this). So for me this is closed.

derekahmedzai’s picture

Disabling "Automatically create one view per queue" and clearing the cache didn't remove the views, but I was then able to delete them.

xmacinfo’s picture

Disabling "Automatically create one view per queue" and clearing the cache did remove the views for me, though.