WordPress.org

Make WordPress Core

Opened 2 years ago

Last modified 2 years ago

#19633 new defect (bug)

Multilingual Permalinks - Broken Pagination

Reported by: aternus Owned by:
Milestone: Awaiting Review Priority: normal
Severity: critical Version: 3.3
Component: Rewrite Rules Keywords:
Focuses: Cc:

Description

With the new rewrite engine in WP3.3 the pagination for pages with multilingual URLs got broken.

See example:
Live Example of Broken Pagination

The permalink structure used for this:
%postname%

The Code Used for the Page:

<div id="main-content">

<?php if (have_posts()) : while (have_posts()) : the_post(); ?>

<h1 class="title"><?php the_title(); ?></h1>

<?php the_content(); ?>

<?php endwhile; endif; ?>

<?php
// The Query
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
$args = array(
	'category_name' => 'testimonials',
	'paged' => "$paged",
	'posts_per_page' => 3
	);
query_posts( $args );

// The Loop
if (have_posts()) : while (have_posts()) : the_post();
?>

<div id="testimonial-wrap">

<blockquote>
<?php the_content(); ?>
<cite><?php the_title(); ?></cite>
</blockquote>

</div>

<?php endwhile; ?>
<div id="pagination">
	<?php next_posts_link('<span class="next-page">הבא &raquo;</span>') ?>
	<?php previous_posts_link('<span class="prev-page">&laquo; הקודם</span>') ?>
</div>

<?php endif; wp_reset_query(); ?>

</div>
<!-- #main-content -->

Change History (2)

comment:1 SergeyBiryukov2 years ago

Could not reproduce with the same page slug and template code.

On your live example, I can see that /חוות-דעת-הלקוחות/page/2 URL is being redirected with 301 back to /חוות-דעת-הלקוחות, which doesn't happen for me on a clean install.

comment:2 aternus2 years ago

Hey Sergey,

Did you use the version available from he.wordpress.org (Hebrew Wordpress) or the stock English one?

Here is additional test info that I've tried:
Originally I've noticed the problem after the WP3.3 upgrade with the following plugins: Wordpress SEO, File Gallery and a Custom Plugin I wrote for SQL DB optimize command. Now I've also tried disabling all plugins completely, but the same issue still appears...

Any insights? Were you able to get the pagination working on your test setup?

Last edited 2 years ago by aternus (previous) (diff)
Note: See TracTickets for help on using tickets.