﻿id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc
4652,Page and category trailing back-slash dependent on post permalink structure,snakefoot,anonymous,"If specifying a post permalink structure like this:

/article/%postname%.html

Then WP_Rewrite will discover that there is no ending back-slash and will set use_trailing_slashes to false.

Whenever creating links to categories og pages then it will now remove the ending back-slash.

This changes all category and page links when upgrading from 2.0 to 2.2, with duplicate content to follow.

The quick patch to this problem is to create a plugin with the following lines:

{{{
<?php
function fix_trailing_backslash() {
  global $wp_rewrite;
  $wp_rewrite->use_trailing_slashes = true;
}

function fix_trailing_backslash_post( $link ) {
  global $wp_rewrite;
  if (!substr($wp_rewrite->permalink_structure, -1, 1) == '/' ))
    return rtrim( $link, '/' );
  return $link;
}

add_action('init', 'fix_trailing_backslash');
add_filter('post_link', 'fix_trailing_backslash_post' );
?>
}}}",defect (bug),closed,high,,General,2.2,major,duplicate,wp_rewrite,
