• Hi,

    We have a site recently upgraded to 2.5 version and we are having this error on categories load:

    Fatal error: Maximum execution time of 30 seconds exceeded
    in /home/marujeo/public_html/wp-includes/classes.php on line 422

    After a little research, it seems that having 999 categories affects to the display_element function and walk method for loading the categories tree.

    We have commented these lines as a patch and we have the site working now, but we are not able of creating new categories ??

    // flat display
    /*if ( -1 == $max_depth ) {
    $empty_array = array();
    foreach ( $elements as $e )
    $output = $this->display_element( $e, $empty_array, 1, 0, $args, $output );
    return $output;
    }*/
    /*foreach ( $top_level_elements as $e )
    $output = $this->display_element($e,$children_elements $max_depth,0,$args,$output );
    /*
    * if we are displaying all levels, and remaining children_elements is not empty,
    * then we got orphans, which should be displayed regardless
    */
    /*if ( ( $max_depth == 0 ) && sizeof( $children_elements ) > 0 ) {
    $empty_array = array();
    foreach ( $children_elements as $orphan_e )
    $output = $this->display_element( $orphan_e, $empty_array, 1, 0, $args, $output );
    }*/

    Any ideas?
    Thanks

Viewing 7 replies - 1 through 7 (of 7 total)
  • Hi pcambra,
    I had 994 categories and the same problem. found your post. I commented out those sections and it fixed it like you said, but I too could not add categories.
    I removed the comments on the first block only, saved, and uploaded. I can now add categories as well as properly view the categories.
    Sometimes I have to add the category twice before it acknoledges my request, but it does work.
    Can someone supply a permanent fix?

    i have 743 categories and am experiencing the same excruciatingly slow load times. the problem occurs both in my admin section, and if i have the categories widget in my sidebar.

    Hi.
    I had also same problem.
    and i change 2 point.
    fix #1:
    class Walker method display_element 435:

    $i--; // fix from $i = -1;

    fix #2:
    and change the Walker class algorithm from “parent find to childlen” to “childlen find to parent”.
    but this change has some poit.  please teach me what should i do?

    any update on this fix? wasn’t clear in the last post and having same problem. Over 600 categories and admin loads slow and kills the server, how hard would it be to make the category listing static in the backend and only update when one was added?

    We are having this same issue, tried both fixes that I found neither of them helped. If anything caused more errors. We have 844 categories, and now we can post to the blog, but can not assign any categories to them, nor can we edit or change the categories and to top it off if we save something as a draft we can no longer access it. Has anyone corrected this issue yet? thanks for your help.

    i was able to fix it using the changes here:
    https://trac.www.ads-software.com/ticket/7147

    Thanks that worked perfect. Now just got to get it to stop timing out and figure out why word press is over loading the server and we’re set! thanks.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Categories load performance slow after 2.5 update’ is closed to new replies.