Make WordPress Core

Opened 5 weeks ago

Last modified 5 weeks ago

#61194 assigned defect (bug)

Duplicate Query for getting Privacy Policy Page

Reported by: aftabalam8028's profile aftab.alam8028 Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 6.2
Component: Privacy Keywords: needs-testing reporter-feedback
Focuses: Cc:

Description

WP stores the privacy policy page id in wp_options table under "wp_page_for_privacy_policy" option_key.

If it has value like "3" and if that page id doesnot exist then it is firing approx 78 duplicate query.
SELECT * FROM wp_posts WHERE ID = 3 LIMIT 1

This query is running only in UI side.

If I select a page from Settings > Privacy then duplicate query is not showing.

Change History (2)

#1 @swissspidy
5 weeks ago

  • Focuses performance removed
  • Keywords needs-testing added
  • Severity changed from major to normal

#2 @swissspidy
5 weeks ago

  • Keywords reporter-feedback added

Hi there and welcome to Trac!

I am unable to reproduce this issue so far. Here's what I did:

  1. Create a new page
  2. Set the page as the privacy policy page
  3. Delete the page

Whether I go to the dashboard, the homepage, or the privacy settings page, there isn't any big amount of duplicate queries like you mention it.

Could you please share more specific steps to reproduce? Verify that the issue still happens with all plugins disabled and when using one of the default themes.

Note: See TracTickets for help on using tickets.