Make WordPress Core

Opened 5 weeks ago

Last modified 5 weeks ago

#44413 new defect (bug)

Privacy policy page select is not up-to-date if the options is setted in another than using the select in wp-admin/privacy.php

Reported by: f2cmb Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Privacy Keywords:
Focuses: Cc:


When registering a privacy policy page or custom post, via 'update_options()' or directly in database via putting a post ID in the 'wp_page_for_privacy_policy' in 'wp_options', the given post is effectively registered as the privacy policy page (for example the link is in the action confirmation mail sent to user), but if i open wp-admin/privacy.php page, the select field is displayed empty.

Attachments (2)

Change History (4)

#1 follow-up: @subrataemfluence
5 weeks ago

Would you please mind to describe the exact steps to reproduce the issue? Thank you!

#2 in reply to: ↑ 1 @f2cmb
5 weeks ago

Replying to subrataemfluence:

Would you please mind to describe the exact steps to reproduce the issue? Thank you!

Hello there !

After updating the post ID, via an update_option(), or directly in the wp_options field, the select stays empty. Here is the way i do it in my plugin (assuming the post with this slug exist) :

//set the regular policy page in wp-admin privacy.php

function register_policy_post() {
    $post = get_page_by_path('politique-de-confidentialite', OBJECT, 'page-systeme');
    if ( $post ) {
        update_option( 'wp_page_for_privacy_policy', $post->ID );

Only the choice made in wp-admin/privacy.php is displayed, even if the post selected is a regular page. I guess a patch would be not to loop for populating the dropdown through all existing posts, but at least display the one registered in the option field in database.

Best regards.

Last edited 5 weeks ago by f2cmb (previous) (diff)
Note: See TracTickets for help on using tickets.