debug - Debugging preview not working problem

admin2025-06-06  2

The link here is ?p=1448&preview=true

Which should be redirected to the /index.php

If I press that link it goes to:

/?p=1429&preview_id=1429&preview_nonce=ddfbdb8ba3&_thumbnail_id=1430&preview=true

Which shows: Sorry, you are not allowed to preview drafts

I could find the message in \wp-content\languages\it_IT.po

#: wp-includes/revision.php:550
msgid "Sorry, you are not allowed to preview drafts."
msgstr "Non hai i permessi per visualizzare le bozze in anteprima."

Looking for the I've reached this method

/wp-includes/revision.php.html

/**
 539   * Filters the latest content for preview from the post autosave.
 540   *
 541   * @since 2.7.0
 542   * @access private
 543   */
 544  function _show_post_preview() {
 545      if ( isset($_GET['preview_id']) && isset($_GET['preview_nonce']) ) {
 546          $id = (int) $_GET['preview_id'];
 547  
 548          if ( false === wp_verify_nonce( $_GET['preview_nonce'], 'post_preview_' . $id ) )
 549              wp_die( __('Sorry, you are not allowed to preview drafts.') );
 550  
 551          add_filter('the_preview', '_set_preview');
 552      }
 553  }

Enabling define('WP_DEBUG', true) in the config file only shows a deprecated error message.

Cloudflare is disabled, flushing the local cache has no impact.

Disabling the check I get this error:

Oops! That page can not be found.

What can I try more?

转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1749156420a316844.html

最新回复(0)