[wp-trac] [WordPress Trac] #44112: WP is changing page URL to avoid duplicate URL for non needed case
WordPress Trac
noreply at wordpress.org
Wed May 16 15:55:54 UTC 2018
#44112: WP is changing page URL to avoid duplicate URL for non needed case
--------------------------------+-----------------------------
Reporter: tubys | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Networks and Sites | Version: 4.9.5
Severity: normal | Keywords:
Focuses: multisite |
--------------------------------+-----------------------------
WP has URL slug validator after page/post saved, when WP recognize
potential of duplicate URL slug between the main site pages and each of
existing multisites URL, WP will update the post_name (page slug URL) and
adding suffix number to the page URL.
In the following scenario this validation should not be made:
* Create New WP multi-site instance (sub-directory).
* Create new site called ‘blog’ and publish it.
* Move to root site.
* Create new page without parent page with name ‘blog’ and publish it.
* WP will change the page slug to ‘blog3’ (with number suffix) to avoid
duplicate URL [OK]
* Create new page with parent page ‘simple-page’ called ‘blog’ and publish
it.
* WP will change the site slug to ‘blog4’ [BUG]
In this case WP should leave the slug as is, because the result URL will
be “simple-page/blog” and there is no URL conflict here.
**Possible Solution:**
update “avoid_blog_page_permalink_collision” function [wp-
admin/includes/ms.php:640] to do not modify the “post_name” if
“post_parent” exists.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/44112>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list