Opened 9 years ago
#41891 new defect (bug)
Bug when changing $(comments_)pagination_base of WP_Rewite instance to string with non-ASCII characters
| Reported by: | dimadin | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Awaiting Review |
| Component: | Rewrite Rules | Version: | |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: |
Description
When you change $pagination_base/$comments_pagination_base for WP_Rewrite instance to string with ASCII characters, it works as expected. But when you change to non-ASCII string, it doesn't work because it redirects from /<pagination_base>/2 to /<pagination_base>/2/<pagination_base>/2 which returns 404. If you use rawurlencode() on that string, it again works as expected.
So, in short:
$GLOBALS['wp_rewrite']->pagination_base = 'something'; - works
$GLOBALS['wp_rewrite']->pagination_base = 'чџш'; - doesn't work
$GLOBALS['wp_rewrite']->pagination_base = rawurlencode( 'чџш' ); - works
This doesn't apply to other bases, they work without rawurlencode(), for example:
$GLOBALS['wp_rewrite']->author_base = 'гдђ';
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)