Make WordPress Core

Opened 2 years ago

#55907 new defect (bug)

Failed to insert log entry: value too long

Reported by: galbaras's profile galbaras Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 5.9.3
Component: Database Keywords:
Focuses: Cc:


Error log shows the following message:

Failed to insert log entry: WordPress database error: Processing the value for the following field failed: [COLUMN]. The supplied value may be too long or contains invalid data.

There's a chance this happens when the message contains an ampersand character (see here).

Regardless, if a value cannot be inserted into the database, it should at least be written to the error log, as this provides context for an otherwise generic message. This should be the case with ANY log insert failure, not just long ones.

Another helpful thing would be to output the call stack.

In this particular case, the "Failed to insert log entry" doesn't seem to be written by WordPress core, and the absence of context makes it very difficult to isolate the cause. Seeing the field value and call stack would be of great help.

Change History (0)

Note: See TracTickets for help on using tickets.