Skip to:
Content
Pages
Categories
Search
Top
Bottom

Fatal error: Maximum execution time of 60 seconds exceeded

  • @brittonk

    Participant

    Fatal error: Maximum execution time of 60 seconds exceeded in /public_html/wp-content/themes/kleo/buddypress/buddypress-functions.php on line 796

    I get this error whenever someone tries to comment on an activity feed item. I have 65,000 users.

    Line 796 is part of this loop:

    		// Because the whole tree has not been loaded, we manually
    		// determine depth
    		$depth = 1;
    		$parent_id = $activities_template->activities[0]->secondary_item_id;
    		while ( $parent_id !== $activities_template->activities[0]->item_id ) {
    			$depth++;
    			$p_obj = new BP_Activity_Activity( $parent_id );
    			$parent_id = $p_obj->secondary_item_id;
    		}
    		$activities_template->activity->current_comment->depth = $depth;
    	}
    

    I don’t know if this is an issue with buddypress or with the kleo theme’s buddypress functions since I’ve only ran their theme.

Viewing 3 replies - 1 through 3 (of 3 total)
  • @brittonk

    Participant

    Found a solution. The code should be”

    		// Because the whole tree has not been loaded, we manually
    		// determine depth
    		$depth = 1;
    		$parent_id = (int) $activities_template->activities[0]->secondary_item_id; 
    		while ( $parent_id !== (int) $activities_template->activities[0]->item_id ) {
    			$depth++;
    			$p_obj = new BP_Activity_Activity( $parent_id );
    			$parent_id = (int) $p_obj->secondary_item_id; 
    		}
    		$activities_template->activity->current_comment->depth = $depth;
    	}

    @shanebp

    Moderator

    If you’ve found a bug or improvement, please open a ticket on trac.

    @brittonk

    Participant

    I found it on your ticket system actually so it looks like you guys are on top of it

    https://buddypress.trac.wordpress.org/changeset/8828

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Fatal error: Maximum execution time of 60 seconds exceeded’ is closed to new replies.
Skip to toolbar