Broken expressions after deleting a field or data type
Deleting a field or data type can leave expressions pointing at something that no longer exists, and the Issue Checker may not flag every case. Find every reference, then either restore the field or rewire the references, and test in development before deploying.
What is happening
When you delete a field, data type or option set, any expression, condition or workflow that still uses it is broken. Bubble's Issue Checker, opened from the issue counter in the editor toolbar, lists most of these problems, and Bubble will not let you deploy to Live while issues remain.
The Issue Checker does not catch everything. The official support documentation notes that it does not flag references to option sets that no longer exist, and that some issues only appear after you visit the page in the editor.
How to fix it
- Open the Issue Checker and visit every page. Some issues only appear once a page has been opened, so click through each page and reusable element.
- Search for the old field. Use the editor's search tool to find remaining references to the field or type, including in backend workflows, conditions and API workflows.
- Decide: restore or rewire. If the deletion was a mistake, recovery may be possible: the official manual explains that a deleted field is only removed for good when you run the Optimize application feature. Confirm in your own app that the field can actually be restored before you rely on that, and do not run Optimize application until you have. If the change was intentional, or the field cannot be restored, point each reference at the new field.
- Remember your data is separate from your structure. A database backup restores data, not fields or data types, and any data created after the restore point is deleted. Do not use a database restore to undo a schema change.
- Test in development first. Development and Live have separate databases. Check the affected pages with realistic data in development, then deploy once the Issue Checker is clear.
- Do not hide the issues. The official documentation advises against turning issue checking off. A hidden issue still breaks the app for users.
Triage / $99
Approximately 1 hour of work. Determining issues and coming back to you with a plan.
Pay $99 and book