{"id":19021037,"date":"2026-09-15T20:42:53","date_gmt":"2026-09-15T20:42:53","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/event-5031-logs-previous-theme-version-after-wordpress-automatic-theme-update\/"},"modified":"2026-09-15T20:42:53","modified_gmt":"2026-09-15T20:42:53","slug":"event-5031-logs-previous-theme-version-after-wordpress-automatic-theme-update","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/event-5031-logs-previous-theme-version-after-wordpress-automatic-theme-update\/","title":{"rendered":"Event 5031 logs previous theme version after WordPress automatic theme update"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">WP Activity Log appeared to record the previous Divi version (<strong>5.12.1<\/strong>) as the \u201cnew version\u201d after WordPress successfully auto-updated the theme to <strong>5.13<\/strong>. I\u2019ve attached screenshots showing the incorrect activity-log entry and the actual installed theme version. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Steps to Reproduce<\/strong><\/p>\n\n\n\n<ol>\n<li>Install and activate a theme with an available update. In my case, I was on <strong>Divi 5.12.1<\/strong>, and then <strong>Divi 5.13<\/strong> became available.<\/li>\n\n\n\n<li>Enable WordPress automatic updates for the theme.<\/li>\n\n\n\n<li>Allow WordPress to perform its normal scheduled automatic update.<\/li>\n\n\n\n<li>After the update completes, check WP Activity Log Event 5031 \u2014 \u201cUser updated a theme.\u201d<\/li>\n\n\n\n<li>Compare the version reported by Event 5031 with the version actually installed.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Expected Result: <\/strong>New version in the text shows the new version, 5.13 in my case<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Actual Result:<\/strong> New version shows the OLD version, 5.12.1 in my case <\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-rich is-provider-imgur wp-block-embed-imgur\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"imgur-embed-pub\" lang=\"en\" data-id=\"NyO9Bhn\"><a href=\"https:\/\/imgur.com\/NyO9Bhn\">View post on imgur.com<\/a><\/blockquote><script async src=\"\/\/s.imgur.com\/min\/embed.js\" charset=\"utf-8\"><\/script>\n<\/div><\/figure>\n\n\n\n<figure class=\"wp-block-embed is-type-rich is-provider-imgur wp-block-embed-imgur\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"imgur-embed-pub\" lang=\"en\" data-id=\"8nT1pOG\"><a href=\"https:\/\/imgur.com\/8nT1pOG\">View post on imgur.com<\/a><\/blockquote><script async src=\"\/\/s.imgur.com\/min\/embed.js\" charset=\"utf-8\"><\/script>\n<\/div><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">I also verified the installed version independently with WP-CLI:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wp theme get Divi --field=version<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">which returns:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>5.13<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The Event 5031 \u201cMore details\u201d data contains:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Theme:\nName: Divi\nVersion: 5.12.1\n\nThemeStatus: Active\nObject: theme\nEventType: updated\nUserAgent: WordPress\/6.9.7; &#091;site URL]\nUsername: Unknown User<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<ul>\n<li><strong>WordPress:<\/strong> 6.9.7<\/li>\n\n\n\n<li><strong>WP Activity Log:<\/strong> 5.6.6<\/li>\n\n\n\n<li><strong>Theme:<\/strong> Updated to Divi 5.13<\/li>\n\n\n\n<li><strong>Theme auto-updates:<\/strong> Enabled in WordPress<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Additional context \/ possible cause \u2014 AI generated<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I investigated this with AI assistance, and it may be related to theme metadata caching during automatic updates.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Event 5031 reads the updated theme version using <code>wp_get_theme()<\/code> during <code>upgrader_process_complete<\/code>. WordPress automatic theme updates use <code>clear_update_cache =&gt; false<\/code>, so it seems possible that WP Activity Log may be reading the cached pre-update theme version before WordPress refreshes the theme cache.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">That could explain why Event 5031 recorded <strong>5.12.1<\/strong>, while the installed theme and subsequent checks report <strong>5.13<\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Are you able to take a look and advise?<\/p>\n","protected":false},"template":"","class_list":["post-19021037","topic","type-topic","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/19021037","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\/19021037\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=19021037"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}