Skip Navigation

[Resolved] Cannot Create a New View with the Same Name as a Previously Deleted View

This support ticket is created 4 years, 8 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

Tagged: 

This topic contains 11 replies, has 2 voices.

Last updated by Andrea 4 years, 8 months ago.

Assisted by: Shane.

Author
Posts
#1778123
toolset-new-view.png

I am trying to: Create a new view using the same name as a previously deleted view.

Link to a page where the issue can be seen: Not public.

I expected to see: New view with name.

Instead, I got: Error message - "Another View already uses this name. Please use another name."

As you can see in the image attached, there are NO existing views. The error message however claims there is an existing view with the same name. There previously was but the view was trashed and then deleted permanently. I cleared all the "caches" in Toolset > Settings to no avail.

To Recreate:

1) Create a new view named "Test View" using Toolset View Block on a New Post.
2) Delete the view named "Test View" (via Toolset > Views). (You may also delete the post.)
3) Create a new view named "Test View" using Toolset View Block.

Actual Result: Error Message - "Another View already uses this name. Please use another name."
Expected Result: New View Created

#1779187

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Andrea,

Thank you for getting in touch.

There should also be a trashed tab in Toolset -> Views where you will see your deleted views.

In order to create a new view with the same slug you will need to delete the view from the trash as well.

Thanks,
Shane

#1779221
toolset-not-used-views.png
toolset-all-views.png

Hi Shane,

Thanks for the feedback. Yes, the view was "trashed" and then "deleted permanently" from the trash already. See the screenshot attached. I still cannot create a new view with the same name (slug).

Unrelated, you will also see a different view that is displayed under "Published" and "Not Used". When you click on "Not Used", it does not appear however (but it is used in a draft post).

#1779267

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Andrea,

Would you mind allowing me to have admin access to the site to check on this for you ?

It should be possible given that you have deleted it from the trash.

I've enabled the private fields for your next response.

Thanks,
Shane

#1780495

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Andrea,

Thank you for setting up this staging site for me.

I've tried to log in but the credentials don't seem to work could you check them on your end and let me know if this is the same for you.

Thanks,
Shane

#1780643

Hi Shane, apologies the account was not setup correctly. I've fixed it and tested the web login with the previously provided credentials. The SFTP should be the same.

#1781705

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Andrea,

Thank you for the updated login.

I was working on identifying the issue but the website seems to be down at the moment.

Can you check on this and let me know what is happening ?

Thanks,
Shane

#1781707

Thanks Shane. Everything appears well on my end.

#1781717

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Andrea,

I found the issue. The problem is that there is a draft view entry in the database with "institutions" as the slug. As soon as I removed it I was able to create a new view with the slug "institutions".

If you would like me to do the same on your production site let me know.

Otherwise you can install the WP PHPMYADMIN plugin and activate it. From there you should be able to access the database by clicking the "Enter PHPMYADMIN" button.

Once you're in select "snapshot_colombianabroa" then click on the search tab and type "institutions".

From there you will need to scroll until you see "wp_posts" then click browse. Scroll down on the page and you should see the table.

Under the post type column look for 'view' then you can just check the views that are there for the one that has only the title as 'institutions' then delete it.

Please let me know if this helps.
Thanks,
Shane

#1781729

Thanks for the solution. I searched and deleted the wp_post entry with title institutions that was in draft status.

The follow up question is why this did not get deleted when the view was deleted. In my initial search on the forums for this issue, I discovered this post https://toolset.com/forums/topic/how-to-delete-view-created-in-block/ that discusses the inability to delete existing views. The feedback is to turn on the old "views" option in settings and delete. Those are the steps I followed after it did not delete itself when the last instance of the view was remove from a post. My concern is this will continue to happen as it seems views are not correctly deleting themselves via any method.

#1784369

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Andrea,

"The feedback is to turn on the old "views" option in settings and delete. Those are the steps I followed after it did not delete itself when the last instance of the view was remove from a post. My concern is this will continue to happen as it seems views are not correctly deleting themselves via any method."

Not sure what happened in this case as I tried to replicate on my end but each time the view gets deleted correctly. The method described above does in fact delete the view.

I know there is an active internal discussion on this but no updates on any decided improvements yet.

Thanks,
Shane

#1784473

Thanks for the additional feedback. I'll mark resolved and will keep an eye on further improvements.