-
-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
delete formie/gc/delete-orphaned-fields is not removing all unused fields #1653
Comments
The reason fields aren't removed when a form is deleted is to support soft-deletion of forms. This is because you can soft delete a form and restore it later. However, fields don't support being soft-deleted, and once they've been deleted, they're gone. For this reason, we don't delete the fields when you delete a form. There's also no hard-delete event raised for us to delete the fields when Craft's garbage collection process has hard-deleted the form to cleanup those fields. So that's why we have a process that checks for any hard-deleted forms, and if their fields are still around to deleted them. So - I would first check if there are any trashed forms. They should be hard-deleted. Then, running that console command should pick up on any fields used by those now non-existant forms. |
Hi, thank you for the fast reply, I tried that but it didn´t resolve the issue for me. I digged a little and found the following: In |
So |
Updated in 2.1.0 |
Describe the bug
Hi,
we have an installment with a very big form inside, containing a lot of fields. I noticed that in the database, there are a lot of custom fields related to formie. I removed the big form but there are still custom fields inside, it looks like they got somehow orphaned during development, however, I can´t delete them with
formie/gc/delete-orphaned-fields
, seems like there is something messed up. Do you know how I can get rid of those fields? We notice performance issues which might be caused by something else, however, seems like around 1600 custom fields in the table are a reason for that: craftcms/cms#13992Thank you in advance!
Steps to reproduce
We somehow got a lot of custom orphaned fields, not sure how to reproduce.
Form settings
Craft CMS version
4.11.1
Plugin version
2.0.42
Multi-site?
Yes
Additional context
Blitz 4.9.0
captcha.eu 1.0.4
CP Field Inspect 1.4.4
Empty Coalesce 4.0.0
Field Manager 3.0.8
Formie 2.0.42
Hyper 1.1.16
ImageOptimize 4.0.5
Redactor 3.0.4
Retour 4.1.14
SEOmatic 4.0.35
Smith 2.0.0
Sprig 2.7.2
Super Table 3.0.12
Timber 1.0.2
Vite 4.0.6
Wishlist 2.0.7
The text was updated successfully, but these errors were encountered: