1 Commits
Author SHA1 Message Date
Mian Shahzad RazaandClaude Opus 4.8 a63ed73c93 fix(#111): invalidate Elementor 4.2 element cache on data writes
MCP-created pages rendered empty on Elementor 4.2.x: create-page writes empty
[] data, an intermediate render caches an empty _elementor_element_cache, and
the plugin's raw update_post_meta() write path never invalidated it (Elementor
only clears it in Document::save(), which the CLI/proxy fallback bypasses). On a
persistent object cache (WP Engine) the stale empty entry survives every content
write, so the page serves the cached empty render forever.

Add EMCP_Tools_Data::init() — an added/updated_post_meta hook that clears
_elementor_element_cache whenever _elementor_data changes, from ANY write path —
plus an explicit clear in the save fallback. Also fixes delayed visibility of
edits to existing pages. Root-caused + fix live-verified on Elementor 4.2.2.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-08-11 22:06:26 +05:00