[wp-trac] [WordPress Trac] #14238: WordPress prevents pages with numeric slugs

WordPress Trac wp-trac at lists.automattic.com
Thu Jul 8 17:35:28 UTC 2010


#14238: WordPress prevents pages with numeric slugs
--------------------------+-------------------------------------------------
 Reporter:  vividvisions  |       Owner:                                    
     Type:  defect (bug)  |      Status:  new                               
 Priority:  normal        |   Milestone:  Awaiting Review                   
Component:  Permalinks    |     Version:  3.0                               
 Severity:  major         |    Keywords:  slug, unique, numeric, page, pages
--------------------------+-------------------------------------------------

Comment(by vividvisions):

 I see. So IMHO, WP has to get smarter in terms of resolving URLs and
 spotting possible conflicts when a new page or post is created. Since a
 page structure should never have the same URL as a post, page numbers of a
 post really shouldn't matter since they're only a suffix to a unique
 permalink. For instance: /page1/page2/345/ could never interfere with
 /2010/07/08/postname/ as long the slug of page1 isn't numeric, whether the
 post is paged or not.

 To spot conflicts in wp_unique_post_slug, my first idea was to take the
 configured permalink structure, create a set of regular expressions of
 possible combinations and match them against the URL of the newly created
 page. If there ''could'' be a problem, tell the user or add a suffix to
 the slug. Or am I naive? ;-)

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/14238#comment:7>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list