• I recently updated Events Manager and now I get this error when you click on an event link. Catchable fatal error: Object of class WP_Error could not be converted to string in /home/moma/public_html/melaniefionaworld.com/wp-content/themes/especial/libraries/breadcrumb.php on line 88

Viewing 9 replies - 1 through 9 (of 9 total)
  • Thread Starter lovemarisol

    (@lovemarisol)

    I’ve seen that page before and tried what it said and it didn’t work. My whole site ended up having an error. But what that page says is to add that code to functions.php. Isn’t my problem in breadcrumb.php so something there has to be fixed right?

    99.9% sure it’s to do with your theme, it assumes that every post type has a normal post category (and has at least one set) when that isn’t necessarily true (e.g. em events). my snippet just assigns a category automatically before the error occurs, ideally you’d fix your theme.

    Thread Starter lovemarisol

    (@lovemarisol)

    Huh? I’m confused. What exactly am I supposed to do? I’m fixing my theme how?

    you can try this one.

    1.)
    Edit your theme breadcrumb.php then find function simple_breadcrumb_case($der_post){

    2.)
    below that add this code global $post;

    3.)
    Find this snippet

    $ID = $category[0]->cat_ID;
    				echo get_category_parents($ID, TRUE, $markup, FALSE );

    And replace with this

    if( $post->post_type == EM_POST_TYPE_EVENT || $post->post_type == EM_POST_TYPE_LOCATION ){
    				$categories = get_the_category();
    				if( count($categories) == 0 ){
    					//assign a category to this
    					wp_set_object_terms($post->ID, 'uncategorized','category');
    				}
    			}else{
    				$ID = $category[0]->cat_ID;
    				echo get_category_parents($ID, TRUE, $markup, FALSE );
    			}

    Thread Starter lovemarisol

    (@lovemarisol)

    I did that and now my whole site is down and has this error:
    Parse error: syntax error, unexpected ‘&’ in /home/moma/public_html/melaniefionaworld.com/wp-content/themes/especial/libraries/breadcrumb.php on line 80

    Is it possible to post your breadcrumb.php codes using pastebin?

    Thread Starter lovemarisol

    (@lovemarisol)

    Ok I put it on pastebin & here’s the link: http://pastebin.com/UeDqEjfs

    Thread Starter lovemarisol

    (@lovemarisol)

    The problem has been fixed. Thank you so much to everyone who tried to help me get it fixed.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Plugin: Events Manager – Catchable fatal error when clicking on event links’ is closed to new replies.