[wp-trac] [WordPress Trac] #13459: Conflict between post and page slugs/permalinks when permalink setting is set to /%postname%/

WordPress Trac noreply at wordpress.org
Mon Dec 21 02:11:00 UTC 2015


#13459: Conflict between post and page slugs/permalinks when permalink setting is
set to /%postname%/
--------------------------+-----------------------------
 Reporter:  jamescollins  |       Owner:  ericlewis
     Type:  defect (bug)  |      Status:  accepted
 Priority:  normal        |   Milestone:  Future Release
Component:  Permalinks    |     Version:  2.9.2
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:
--------------------------+-----------------------------

Comment (by ericlewis):

 @SergeyBiryukov said:

 > Seems like '/%postname%/' === $wp_rewrite->permalink_structure won't
 catch a static prefix, e.g. '/blog/%postname%/'. Would that still cause a
 conflict if there's a 'Blog' page with subpages?

 I've created a plugin to approach the problem in a more holistic way —
 [https://github.com/ericandrewlewis/wp-cool-slugs Cool slugs]. It uses the
 rewrite API to determine if a URL namespace is already occupied. This has
 the potential to avoid all problems of this nature. What do you think?

 cc @boonebgorges, who also has a natural affinity to
 `wp_unique_post_slug()`.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/13459#comment:49>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list