[wp-trac] [WordPress Trac] #56694: Uncached database read for logged in users when Privacy Policy Page is deleted
WordPress Trac
noreply at wordpress.org
Sun Apr 5 19:37:24 UTC 2026
#56694: Uncached database read for logged in users when Privacy Policy Page is
deleted
-------------------------------------+-------------------------------------
Reporter: johnjamesjacoby | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Privacy | Version: 5.7
Severity: normal | Resolution:
Keywords: needs-unit-tests has- | Focuses: administration,
patch | performance, privacy
-------------------------------------+-------------------------------------
Changes (by masteradhoc):
* focuses: administration, performance => administration, performance,
privacy
Comment:
Hey @johnjamesjacoby
i just prepared a PullRequest over at https://github.com/WordPress
/wordpress-develop/pull/11443
Could you give it a test as well? i followed your suggested pattern.
**These are the tests i performed locally:**
''Test A — Trash resets the option''
Set a page as the Privacy Policy page, trashed it via the Pages list, then
ran wp option get wp_page_for_privacy_policy. Result: 0. ✅
''Test B — Permanent delete resets the option''
Same setup, then permanently deleted the page from Trash. Result: 0. ✅
''Test C — Self-healing in notice()''
Manually set the option to a non-existent ID (wp option update
wp_page_for_privacy_policy 99999), visited a page edit screen (/wp-
admin/post.php?post=1&action=edit), then checked the option. Result: 0. ✅
''Test D — Trash notice removed from Settings → Privacy''
With the option set to a non-existent ID, visited Settings → Privacy.
Confirmed the old "page is in the Trash / restore" message no longer
appears. The "page does not exist" fallback still shows correctly. ✅
Could you give it a test as well? Appreciate your feedback.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/56694#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list