I had created view, and I need to delete it to importe new view code, the function list not showing delete, under the view name showing "in code"!
So I went to the DB to delete it manually, the view name is not in table view_view, only in table cache_view !

What, and how to delete it !??!

THX.

Comments

merlinofchaos’s picture

Status: Active » Fixed

You can't delete views that are in code. The easiest thing to do would be to disable that view then import the view you are trying to import with a different name.

There used to be a checkbox that allowed you to override an existing view with an import. Is that gone?

marvix’s picture

Yes, its gone!
I had manually deleted from DB, and its works fine now, but should be clean way to do solve it !

rsgracey’s picture

Why can we not delete views outright from the admin/structure/views page? I think that the deprecated calendar views are causing a bunch of errors (just a suspicion), and I want to delete them to remove them entirely from the system.

rsgracey’s picture

Status: Fixed » Active

I need to delete the deprecated Calendar module views, but I can't find a way to delete them from the interface.

dawehner’s picture

Can't you simple disable them?

rsgracey’s picture

It doesn't seem to help. Isn't it odd not to have an option to delete something?--the Calendar folks instruct users to delete the deprecated views, but it's weird that there's no way to do that. What's the specific reason for not having a delete option?

bojanz’s picture

Status: Active » Fixed

If it doesn't seem to help, then you're doing it wrong. A disabled view doesn't do anything and can't cause any errors.
A view that is in code is provided by a hook in a module. There's no database row that Views can go and delete.

If the problem is with Calendar views, then those views are provided by the Calendar module. Update the module, or open an issue in their queue.

rsgracey’s picture

But still the question remains: Isn't it odd that deleting a view isn't a standard function of this module? If I can "add" something, shouldn't I be able to "delete" it? Do you just accumulate hundreds of disabled views?

merlinofchaos’s picture

You are not actually reading what we are saying. Please read what I wrote in comment #1.

Deleting a view is a standard function. However, if a view is in *code*, i.e, not in the database, it can't be deleted. This is because *views cannot delete code*. What you do then is disable it.

If disabling it is not fixing the problem, then the fault is with the module providing the view, not Views.

When listing the view, you should see a string that says "In code" or "In database". Views that are "in database" will have delete actions associated with it; Views that are not will not.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.