WordPress.org

Make WordPress Core


Ignore:
Timestamp:
10/21/2015 04:25:31 PM (4 years ago)
Author:
boonebgorges
Message:

Don't force comment pagination.

[34561] instituted the policy of forcing pagination for comments. This strategy
was intended to avert problems when 'page_comments' is set to 0 - as it is by
default - and the number of comments on a given post rises into the hundreds or
thousands. By forcing pagination in all cases, we ensured that WordPress would
not time out by processing unwieldy numbers of comments on a given pageload.

The strategy proves problematic, however, because comment permalinks are
generated using the page of the comment. Forcing pagination for posts that
were not previously paginated would change the URL of all comments that do not
appear on the default comment page.

This changeset reintroduces the 'page_comments' setting and its corresponding
checkbox on Settings > Discussion. A number of tests, which were written after
[34561], are modified to work now that 'page_comments' will, once again, be
disabled by default.

See #8071.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/comment/commentsTemplate.php

    r35242 r35331  
    167167        update_option( 'comment_order', 'asc' );
    168168        update_option( 'default_comments_page', 'newest' );
     169        update_option( 'page_comments', '1' );
    169170
    170171        $link = add_query_arg( array(
     
    222223        update_option( 'comment_order', 'desc' );
    223224        update_option( 'default_comments_page', 'newest' );
     225        update_option( 'page_comments', '1' );
    224226
    225227        $link = add_query_arg( array(
     
    267269        update_option( 'comment_order', 'asc' );
    268270        update_option( 'default_comments_page', 'oldest' );
     271        update_option( 'page_comments', '1' );
    269272
    270273        $link = add_query_arg( array(
     
    312315        update_option( 'comment_order', 'desc' );
    313316        update_option( 'default_comments_page', 'oldest' );
     317        update_option( 'page_comments', '1' );
    314318
    315319        $link = add_query_arg( array(
     
    354358        update_option( 'default_comments_page', 'newest' );
    355359        update_option( 'comment_order', 'desc' );
     360        update_option( 'page_comments', '1' );
    356361
    357362        $link = add_query_arg( array(
     
    396401        update_option( 'default_comments_page', 'newest' );
    397402        update_option( 'comment_order', 'desc' );
     403        update_option( 'page_comments', '1' );
    398404
    399405        $link = add_query_arg( array(
     
    441447        update_option( 'comment_order', 'desc' );
    442448        update_option( 'default_comments_page', 'oldest' );
     449        update_option( 'page_comments', '1' );
    443450
    444451        $link_p1 = add_query_arg( array(
     
    515522        update_option( 'comment_order', 'desc' );
    516523        update_option( 'default_comments_page', 'newest' );
     524        update_option( 'page_comments', '1' );
    517525
    518526        $link_p0 = add_query_arg( array(
Note: See TracChangeset for help on using the changeset viewer.