[wp-trac] [WordPress Trac] #55907: Failed to insert log entry: value too long

WordPress Trac noreply at wordpress.org
Fri Jun 3 06:30:36 UTC 2022


#55907: Failed to insert log entry: value too long
--------------------------+-----------------------------
 Reporter:  galbaras      |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Database      |    Version:  5.9.3
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 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 [https://core.trac.wordpress.org/ticket/32315#comment:97
 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.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/55907>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list