Fatal error / 500 while editing in Elementor 4.3
-
Environment:
- WP Activity Log (WSAL) v5.6.6
- Elementor 4.3.0 / Elementor Pro 4.3.0
- WordPress core, PHP 8.3.33
- MySQL 8.0.46
- WP_MEMORY_LIMIT: 1024M (at time of error)
Exact error (from WSAL’s own debug.log):
Error: Commands out of sync; you can’t run this command now
Line: 1400
File: classes/Entities/class-abstract-entity.php
SQL: SELECT wpfv_wsal_occurrences.* FROM wpfv_wsal_occurrences WHERE 1 ORDER BY created_on DESC LIMIT 5
Reported memory usage at the time of the error: ~1023MB (close to the 1024M limit configured)Steps to reproduce:
Saving changes in the Elementor 4.3 editor, particularly actions
involving global-classes and design-system-sync (both new in this
Elementor version), causes the editor to fire a batch of requests to
admin-ajax.php within a single edit session. This triggers a rapid
sequence of audit log events inside WSAL within the same PHP request.Result: a fatal “Commands out of sync” error on the mysqli
connection, causing a 500 error on admin-ajax.php and WordPress’s
“There has been a critical error on this website” screen. Confirmed
via full HTTP transaction capture (request/response) and WSAL’s own
debug log at the exact error timestamp.Likely technical cause:
The pattern of inserting a new audit event and then immediately
querying the latest records back (presumably for UI refresh) on the
same mysqli connection, without ensuring
mysqli_store_result()/mysqli_free_result() between the two queries,
causes MySQL protocol desynchronization when multiple events are
logged in rapid succession within the same request.Request: a fix in the read/write flow in
classes/Entities/class-abstract-entity.php (around line 1400) to use
WordPress’s $wpdb->get_results() (which handles buffering correctly)
instead of direct mysqli access, or to ensure the previous resultset
is released before the next query on the same connection.
You must be logged in to reply to this topic.