WordPress.org

Ready to get started?Download WordPress

Forums

WordPress SEO by Yoast
[resolved] Bug: generation of canonical links for paginated posts (4 posts)

  1. TLA Media
    Member
    Posted 2 years ago #

    There is a bug in frontend/class-frontend.php in relation to generation of canonical links for paginated posts.

    The query variable 'page' is not included in the canonical link.

    It a simple matter of a wrong variable name. In the lines 359-361 of class-frontend.php, the variable $link should be renamed to $canonical like this:

    $canonical = add_query_arg( 'page', get_query_var('page'), $canonical );
    } else {
    canonical = user_trailingslashit( trailingslashit( $canonical ) . get_query_var( 'page' ) );

    http://wordpress.org/extend/plugins/wordpress-seo/

  2. TLA Media
    Member
    Posted 2 years ago #

    I can see that this will be moved into core (Ticket #18660) and hopefully by version 3.5. Would be nice though with a bug fix in the plugin before that.

  3. Joost de Valk
    Member
    Plugin Author

    Posted 2 years ago #

    Ah thanks! Just put this on the slate for 1.1.7.

  4. fighterstyle
    Member
    Posted 2 years ago #

    I'm on version 1.2.5 and I still have this issue.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic