• /home2/writinl4/public_html/angeltrivia/wp-admin/includes/class-wp-list-table.php on line 140

    the if statement referenced is:

    if ( !$args['total_pages'] && $args['per_page'] > 0 ) {
                $args['total_pages'] = ceil( $args['total_items'] / $args['per_page'] );
            }

    I checked the variables, and they were set as so:

    $args['total_pages'] = 0
    $args['per_page'] = 20
    $args['total_items'] = ( array of items )

    Uh.. can’t divide an array!

    So I changed the if calculation to:

    if ( !$args['total_pages'] && $args['per_page'] > 0 ) {
                $args['total_pages'] = ceil( count( $args['total_items'] ) / $args['per_page'] );
            }

    and it works…

    Not… sure where to post this bug…. so here it is for others.

Viewing 11 replies - 1 through 11 (of 11 total)
  • Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    Post it on trac.wordPress.org please and thank you 🙂

    I get the same error after upgrading from 3.0 to 3.2 and it persists in 3.2.1.

    The suggested fix seems to work, but I am loathe to hack core.

    idbill – let’s compare plugins: I’ve already tried disabling all those that wouldn’t totally mess up my production setup.

    Thread Starter idbill

    (@idbill)

    The Support ticket linked below was closed:
    http://core.trac.wordpress.org/ticket/16842

    The Active Plugins are:
    WPAUTOP
    Disables the wpautop function for the_content and the_excerpt.
    Version 1.0 | By Nick Momrik | Visit plugin site

    Random Post Link
    Generates a link that takes a user to a random post, but never the same as before.
    Version 1.0.1 | By scribu | Visit plugin site

    WP Minify
    This plugin uses the Minify engine to combine and compress JS and CSS files to improve page load time.
    Version 1.0.4 | By Thaya Kareeson | Visit plugin site

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    Turn them ALL off and see if it goes away.

    Thread Starter idbill

    (@idbill)

    I’ll suggest that to the designer.

    idbill – did you ever get this resolved? I have tried toggling almost all my plugins individually, without effect. Unfortunately, I can’t turn all my plugins off without taking an entire university offline (and I have concerns about some critical plugins retaining their settings upon reactivation).

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    tirussell – Two thoughts.

    1) Turn off as many as you CAN at once.
    2) Duplicate your site locally and see if you can recreate the problem.

    Thread Starter idbill

    (@idbill)

    For the site that I originally reported the issue, the problem as far as I know still exists.

    For the other dozen or so sights that I admin, it has not been an issue.

    The reason I’m following up is because idbill’s fix breaks pagination everywhere else in the backend – you only get the first page of posts/comments/pages/etc.

    I duplicated my entire site locally (hey, easyphp is great!) and deactivated all my plugins including MU and drop-ins.

    Same error.

    Thought it might be something in my theme, since that’s the only thing still not core (right?) so activated 2011.

    Same error.

    Thread Starter idbill

    (@idbill)

    If my fix breaks pagination, then your problem is different than the one I reported.

    The problem I was reporting, was because:
    $args[‘total_items’] = ( array of numbers )

    when wordpress expects:
    $args[‘total_items’] = [ a number ]

    which is undoubtedly from the the plugin:
    ‘Random Post Link’

    Please verify that your error is the same as mine, then verify the variables are what you think they should be.

    I can confirm that my $args[‘total_items’] is a multidimensional array containing all the comments. I may have been incorrect about the pagination issue.

    I should say WAS an array; I think I found the source of the problem.

    I had run the auto-updater the last two updates, and it must have missed something, because I found that overwriting the top-level wp-includes directory (not the admin one) with a freshly-downloaded copy solved the issue. I went back and did all the files one-by-one to find the culprit.

    In my case (hopefully yours too so this can help), the file /wp-includes/comments.php needed to be updated. The version on my server was 63891 bytes, and the fresh copy is 66495 bytes.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘BUG: class-wp-list-table.php on line 140’ is closed to new replies.