-
Notifications
You must be signed in to change notification settings - Fork 41
Entry stuck in draft when entry name exceeds 255 characters — silent update failure #2967
Description
Hello,
I encountered a puzzling error one of our applicants was experiencing and I believe I traced a root cause.
When an entry's name value exceeds 255 characters, $wpdb->update() fails silently under MySQL strict mode (STRICT_TRANS_TABLES), preventing the entire row update — including is_draft, updated_at, and updated_by. This causes entries to become permanently stuck in draft status with no error shown to the user.
The name column on wp_frm_items is varchar(255). When the value exceeds 255 characters, WordPress's $wpdb->update() rejects the entire query under MySQL strict mode rather than just the oversized column — so no columns get updated at all.
Steps to reproduce:
- Configure a form where the entry title is mapped to a field that can accept long text (e.g., a textarea)
- Create an entry as a draft where that field value exceeds 255 characters
- Attempt to submit (finalize) the draft entry
- The entry remains stuck as a draft — is_draft never changes from 1 to 0
The solution is to truncate the entry name on update to fit the varchar(255) column.