{"id":19026757,"date":"2026-09-23T00:48:31","date_gmt":"2026-09-23T00:48:31","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/fatal-error-500-while-editing-in-elementor-4-3\/"},"modified":"2026-09-23T00:48:31","modified_gmt":"2026-09-23T00:48:31","slug":"fatal-error-500-while-editing-in-elementor-4-3","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/fatal-error-500-while-editing-in-elementor-4-3\/","title":{"rendered":"Fatal error \/ 500 while editing in Elementor 4.3"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Environment:<\/p>\n\n\n\n<ul>\n<li>WP Activity Log (WSAL) v5.6.6<\/li>\n\n\n\n<li>Elementor 4.3.0 \/ Elementor Pro 4.3.0<\/li>\n\n\n\n<li>WordPress core, PHP 8.3.33<\/li>\n\n\n\n<li>MySQL 8.0.46<\/li>\n\n\n\n<li>WP_MEMORY_LIMIT: 1024M (at time of error)<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Exact error (from WSAL&#8217;s own debug.log):<br \/>Error: Commands out of sync; you can&#8217;t run this command now<br \/>Line: 1400<br \/>File: classes\/Entities\/class-abstract-entity.php<br \/>SQL: SELECT wpfv_wsal_occurrences.* FROM wpfv_wsal_occurrences WHERE 1 ORDER BY created_on DESC LIMIT 5<br \/>Reported memory usage at the time of the error: ~1023MB (close to the 1024M limit configured)<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Steps to reproduce:<br \/>Saving changes in the Elementor 4.3 editor, particularly actions<br \/>involving global-classes and design-system-sync (both new in this<br \/>Elementor version), causes the editor to fire a batch of requests to<br \/>admin-ajax.php within a single edit session. This triggers a rapid<br \/>sequence of audit log events inside WSAL within the same PHP request.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Result: a fatal &#8220;Commands out of sync&#8221; error on the mysqli<br \/>connection, causing a 500 error on admin-ajax.php and WordPress&#8217;s<br \/>&#8220;There has been a critical error on this website&#8221; screen. Confirmed<br \/>via full HTTP transaction capture (request\/response) and WSAL&#8217;s own<br \/>debug log at the exact error timestamp.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Likely technical cause:<br \/>The pattern of inserting a new audit event and then immediately<br \/>querying the latest records back (presumably for UI refresh) on the<br \/>same mysqli connection, without ensuring<br \/>mysqli_store_result()\/mysqli_free_result() between the two queries,<br \/>causes MySQL protocol desynchronization when multiple events are<br \/>logged in rapid succession within the same request.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Request: a fix in the read\/write flow in<br \/>classes\/Entities\/class-abstract-entity.php (around line 1400) to use<br \/>WordPress&#8217;s $wpdb-&gt;get_results() (which handles buffering correctly)<br \/>instead of direct mysqli access, or to ensure the previous resultset<br \/>is released before the next query on the same connection.<\/p>\n","protected":false},"template":"","class_list":["post-19026757","topic","type-topic","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/19026757","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/19026757\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=19026757"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}