[wp-trac] [WordPress Trac] #5305: permalinks broken when article name is numeric

WordPress Trac noreply at wordpress.org
Fri Jan 31 18:41:05 UTC 2014


#5305: permalinks broken when article name is numeric
--------------------------+-----------------------------
 Reporter:  thomask       |       Owner:  ryan
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Future Release
Component:  Permalinks    |     Version:  2.3.1
 Severity:  major         |  Resolution:
 Keywords:  needs-patch   |     Focuses:
--------------------------+-----------------------------

Comment (by Denis-de-Bernardy):

 Posting the entire #26974 ticket's description for reference:

 To reproduce, create a new blog, select that permalink structure, and
 publish an untitled post. View it. Expected: the post shows up. Actual:
 the day shows up empty — unless, of course, the post's day matches the
 post's id.
 Minor, but annoying. Temporary fix to disable day links entirely:

 {{{
 add_filter('date_rewrite_rules', function($date_rewrite_rules) {
         if (get_option('permalink_structure') ==
 '/%year%/%monthnum%/%postname%/') {
                 $date_rewrite_rules = array_filter($date_rewrite_rules,
 function($rule) {
                         return strpos($rule, '&day=') === false;
                 });
         }
         return $date_rewrite_rules;
 });

 }}}

 Methinks disabling day links should be the default behavior in WP when
 that structure is chosen.

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


More information about the wp-trac mailing list