Any pages with page type posts, order type posts, or posts show this error. This is only visible on a hosted environment. I cannot replicate the errors locally
I have done the following in this order:
- deactivated all plugins
- went to settings->permalinks and resaved the %postname% option
- verified that error is still present with no plugins and permalinks reset.
- Updated all plugins and themes.
- Verified error is still present.
- Followed the same procedure locally, and was not able to replicate this problem.
from class-wp.php:
foreach ( (array) $rewrite as $match => $query ) {
// If the requested file is the anchor of the match, prepend it to the path info.
if ( ! empty( $requested_file ) && strpos( $match, $requested_file ) === 0 && $requested_file != $requested_path ) {
$request_match = $requested_file . '/' . $requested_path;
}
if ( preg_match( "#^$match#", $request_match, $matches ) ||
preg_match( "#^$match#", urldecode( $request_match ), $matches ) ) {
if ( $wp_rewrite->use_verbose_page_rules && preg_match( '/pagename=\$matches\[([0-9]+)\]/', $query, $varmatch ) ) {
// This is a verbose page match, let's check to be sure about it.
$page = get_page_by_path( $matches[ $varmatch[1] ] );
if ( ! $page ) {
continue;
}
$post_status_obj = get_post_status_object( $page->post_status );
if ( ! $post_status_obj->public && ! $post_status_obj->protected
&& ! $post_status_obj->private && $post_status_obj->exclude_from_search ) {
continue;
}
}
// Got a match.
$this->matched_rule = $match;
break;
}
}
I have scoured the interweb for an answer on this, but I have come up with nothing. Let the WordPress Junkies speak please.
$match
? I suspect a quantifier in it. – Taiwanpreg_match
, do:$temp = preg_quote($match)
and then use this new variable in the preg_match:preg_match( "#^$temp#", ...
. – Taiwan