Make WordPress Core

Opened 10 years ago

Closed 9 years ago

#1341 closed defect (bug) (worksforme)

<!--nextpage--> navigation on permalinks with no trailing slash fails

Reported by: Joen Owned by: ryan
Milestone: Priority: normal
Severity: minor Version:
Component: General Keywords: nextpage
Focuses: Cc:


When using rewritten permalinks with no trailing slashes, for instance
Paged post navigation fails working.

Quite simply, what should have been
ends being

Note: /%year%/%monthnum%/%postname%/2/ will still work, but the paged navigation won't link to this.

Attachments (1)

link_pages.diff (639 bytes) - added by Joen 10 years ago.

Download all attachments as: .zip

Change History (7)

comment:1 @Joen10 years ago

  • Patch set to No

comment:2 @twistedraisin10 years ago

--- template-functions-links.php (revision 2597)
+++ template-functions-links.php (working copy)
@@ -44,6 +44,9 @@

$permalink = get_settings('permalink_structure');

+ if (!preg_match('/\/$/',$permalink))
+ $permalink .= "/";

if ( != $permalink && 'draft' != $post->post_status) {

$unixtime = strtotime($post->post_date);

@@ -489,4 +492,4 @@



\ No newline at end of file

comment:3 @ryan10 years ago

  • Owner changed from anonymous to rboren
  • Status changed from new to assigned

comment:4 @matt10 years ago

  • fixed_in_version set to
  • Resolution changed from 10 to 20
  • Status changed from assigned to closed

@Joen10 years ago

comment:5 @Joen10 years ago

  • Component changed from Administration to General
  • Keywords nextpage added
  • Resolution fixed deleted
  • Status changed from closed to reopened
  • Version changed from 1.5.1 to

Kudos on fixing it, but there's still a problem.

When using wp_link_pages in the following way:

<?php wp_link_pages('before=<p>&after=</p>&next_or_number=number&pagelink=%'); ?>

the problem re-appears. The "Next" link will link to /%postname%2/ rather than /%postname%/2/

comment:6 @rob1n9 years ago

  • Cc twistedraisin removed
  • Resolution set to worksforme
  • Status changed from reopened to closed


Note: See TracTickets for help on using tickets.