Skip to content

Entry stuck in draft when entry name exceeds 255 characters — silent update failure #2967

@sjsiegel001

Description

@sjsiegel001

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:

  1. Configure a form where the entry title is mapped to a field that can accept long text (e.g., a textarea)
  2. Create an entry as a draft where that field value exceeds 255 characters
  3. Attempt to submit (finalize) the draft entry
  4. 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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions