Delete Doctype ends in errors and strange behavior

Hi,

i hope you can help me to understand this problem.
We created a Doctype and used it from some experiments. Later we deleted it.

Our thoughts were that it will delete cascading, but instead we got a lot of “Missing Doctype” errors.
For example the Links feature of a doctype stopped working.

So we recreated the Doctype and found all the old entries in the table.

So i guess deleting a Doctype does not really mean it will be deleted? At least not cascading.

Any solution for this? ERPNext 10.1.57 self-hosted.

Kind regards

Maybe this will help:

By the way. Do you have data in your server that you need? Or can you afford to lose all the data and start from scratch?

You can use bench --site sitename reinstall to reinstall the apps to your site. Just make sure to delete the should-be-deleted doctype’s folder and files in the apps/appname/appname/appname/doctype/ folder before running the reinstall or else it will still install the doctype to your site.

However, it WILL DELETE EVERYTHING in your database. Customizations exported in a custom app + new doctypes with existing files will be retained. So use this command with caution.

Similarly, you can use drop-site to drop the site and proceed to create a fresh site with the updated version of your app/s (with the deleted doctype and it’s files gone like the wind). Again, you will lose your site’s data just like the first one. But if you can afford to, then why not?

Cheers.