WordPress.org

Make WordPress Core

Opened 3 years ago

Closed 20 months ago

#46255 closed defect (bug) (duplicate)

"Need help putting together your new Privacy Policy page?" notice always shown if Privacy Policy is the first page created

Reported by: filippo.toso Owned by:
Milestone: Priority: normal
Severity: minor Version: 4.9.6
Component: Privacy Keywords:
Focuses: ui, administration Cc:

Description

Hi,

if the first page returned by get_post() is the Privacy Policy page, the "Need help putting together your new Privacy Policy page?" notice will be always shown.

This happens due to the following row in WP_Privacy_Policy_Content::notice():

$post = get_post( $post );

This method is called by admin_notices action without parameters. This means that get_post returns the first post. If this post is the Privacy Policy, the notice will be always shown. I suggest adding the following check at the beginning of the method:

if ( ! $post ) {
    return;
}

Change History (3)

This ticket was mentioned in Slack in #core-privacy by desrosj. View the logs.


3 years ago

#2 @garrett-eclipse
3 years ago

  • Focuses ui privacy added
  • Keywords reporter-feedback added
  • Version changed from 5.0.3 to 4.9.6

Thanks for the report @filippo.toso sadly I've been unable to reproduce on a clean install.

Can you test with a fresh 5.1 instance and provide steps to reproduce as well as screenshots and URL paths for the admin screens this is affected so I can try to recreate and investigate the problem.

Appreciated

#3 @garrett-eclipse
20 months ago

  • Component changed from Administration to Privacy
  • Focuses administration added; privacy removed
  • Keywords reporter-feedback removed
  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Closing this ticket as it was reproduced and resolved in #48431 which is pending a commit (hopefully in 5.4). The patch there restricts the display to the 'post' edit screen and supports classic & block editors. Thank you again for the report @filippotoso

Note: See TracTickets for help on using tickets.