Opened 22 months ago
Last modified 17 months ago
#58536 new defect (bug)
url_to_postid does not work at MS install in context of another blog when $wp_rewrite->use_verbose_page_rules differs
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | |
Component: | Rewrite Rules | Keywords: | |
Focuses: | multisite | Cc: |
Description
In a multisite installation, where there are blogs with mixed permastruct of some have the $wp_rewrite->use_verbose_page_rules
set to true
and some to false
, the url_to_postid
fails to find a post, since it's queried as a page, due to a falsey check.
As the rewrites rules are untouched upon switch_to_blog
action and as the url_to_postid
function works directly with the rewrite_rules
option (via `WP_Rewrite::wp_rewrite_rules()` function ), IMHO the best way to fix such a case would be to not rely on the property, but perform the same check as when the use_verbose_page_rules
property is being set (see the attached patch).
Attachments (1)
Change History (2)
Note: See
TracTickets for help on using
tickets.