$conf, $runtime; function_exists('chdir') AND chdir(APP_PATH); $r = 'mysql' == $conf['cache']['type'] ? website_set('runtime', $runtime) : cache_set('runtime', $runtime); } function runtime_truncate() { global $conf; 'mysql' == $conf['cache']['type'] ? website_set('runtime', '') : cache_delete('runtime'); } register_shutdown_function('runtime_save'); ?>debug - Debugging preview not working problem|Programmer puzzle solving
最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

debug - Debugging preview not working problem

matteradmin8PV0评论

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?

Articles related to this article

Post a comment

comment list (0)

  1. No comments so far