Fatal Error in Add Event and List Event Pages

Home Forums Calendar Products Community Events Fatal Error in Add Event and List Event Pages

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #20812
    Christopher Roy
    Participant

    Hey guys,

    Just bought the community events plug-in. Thank you for building this. We have wanted a feature like this for years.

    Wondering if you provide any consulting services to help implement this into a theme? We are getting an error and need help. If this is an easy would appreciate the support, or if more involved we are happy to pay to help us get this working.

    Here are the details:

    We are seeing a conflict with the theme that we use to run the site and I can’t figure out why. Here’s what I’ve done:

    I’ve gotten The Events Calendar working using a modified ‘Default Events Template’ – this is the only way The Events Calendar will work in our theme, otherwise it throws an error. I’ve followed your instructions to create an /events folder and placed the modified ecp-page-template.php and ecp-single-template.php

    You can see this here: http://saltspringexchange.com/events/
    Single test event here: http://saltspringexchange.com/event/test/

    However, no matter how much monkeying around with PHP (I don’t know much) and playing with the configurations, I can’t get our paid Community Events plug-in to work:

    http://saltspringexchange.com/events/community/add/
    http://saltspringexchange.com/events/community/list

    We are getting an error with our Classipress theme:

    Catchable fatal error: Object of class WP_Error could not be converted to string in /home/ssicommunity/saltspringexchange.com/wp-content/themes/classipress/includes/theme-functions.php on line 1517

    Is this something obvious or could we pay one of you to help us?

    Christopher

    #20838
    Jonah
    Participant

    Hi Christopher,

    Sorry for the delay in getting to this. It looks like it’s something with your theme since the error is related to one of your theme files. I would suggest contacting the theme developer and getting support from them. Unfortunately we don’t have anyone internally that can help you with this.

    Good luck!

    – Jonah

    #24875
    alfozaie
    Participant

    Hello Christopher, the problem you’re experiencing is due to breadcrumbs, you need to disable breadcrumbs on your website in order for these features to work, don’t worry they’re useless. Please back up your server before you proceed.

    In order to disable breadcrumbs you need to edit your “theme-functions.php” located under:

    /home/ssicommunity/saltspringexchange.com/wp-content/themes/classipress/includes/theme-functions.php

    then what you need to do is remove this from it:

    // Breadcrumb for the top of pages
    function cp_breadcrumb() {
    global $app_abbr, $post;

    $delimiter = ‘»’;
    $currentBefore = ”;
    $currentAfter = ”;

    if ( !is_home() || !is_front_page() || is_paged() ) :
    $flag = 1;
    echo ”;
    echo ‘‘ . __(‘Home’, ‘appthemes’) . ‘ ‘ . $delimiter . ‘ ‘;

    // figure out what to display
    switch ($flag) :

    case is_tax(APP_TAX_TAG):
    echo $currentBefore . __(‘Ads tagged with’, ‘appthemes’) .’ '’ . single_tag_title(”, false) . ‘'’ . $currentAfter;
    break;

    case is_tax():
    // get the current ad category
    $term = get_term_by( ‘slug’, get_query_var( ‘term’ ), get_query_var( ‘taxonomy’ ) );
    // get the current ad category parent id
    $parent = $term->parent;
    // WP doesn’t have a function to grab the top-level term id so we need to
    // climb up the tree and create a list of all the ad cat parents
    while ($parent):
    $parents[] = $parent;
    $new_parent = get_term_by( ‘id’, $parent, get_query_var( ‘taxonomy’ ));
    $parent = $new_parent->parent;
    endwhile;

    // if parents are found display them
    if(!empty($parents)):
    // flip the array over so we can print out descending
    $parents = array_reverse($parents);
    // for each parent, create a breadcrumb item
    foreach ($parents as $parent):
    $item = get_term_by( ‘id’, $parent, get_query_var( ‘taxonomy’ ));
    $url = get_term_link( $item->slug, APP_TAX_CAT );
    echo ‘‘.$item->name.’ ‘ . $delimiter . ‘ ‘;
    endforeach;
    endif;
    echo $currentBefore . $term->name . $currentAfter;
    break;

    case is_singular(APP_POST_TYPE):
    // get the ad category array
    $term = wp_get_object_terms($post->ID, APP_TAX_CAT);
    if(!empty($term)):
    // get the first ad category parent id
    $parent = $term[0]->parent;
    // get the first ad category id and put into array
    $parents[] = $term[0]->term_id;
    // WP doesn’t have a function to grab the top-level term id so we need to
    // climb up the tree and create a list of all the ad cat parents
    while ($parent):
    $parents[] = $parent;
    $new_parent = get_term_by( ‘id’, $parent, APP_TAX_CAT );
    $parent = $new_parent->parent;
    endwhile;
    // if parents are found display them
    if(!empty($parents)):
    // flip the array over so we can print out descending
    $parents = array_reverse($parents);
    // for each parent, create a breadcrumb item
    foreach ($parents as $parent):
    $item = get_term_by( ‘id’, $parent, APP_TAX_CAT );
    $url = get_term_link( $item->slug, APP_TAX_CAT );

    echo ‘‘.$item->name.’ ‘ . $delimiter . ‘ ‘;
    endforeach;
    endif;
    endif;
    echo $currentBefore . the_title() . $currentAfter;
    break;

    case is_single():
    $cat = get_the_category();
    $cat = $cat[0];
    echo get_category_parents($cat, TRUE, ” $delimiter “);
    echo $currentBefore . the_title() . $currentAfter;
    break;

    case is_category():
    global $wp_query;
    $cat_obj = $wp_query->get_queried_object();
    $thisCat = $cat_obj->term_id;
    $thisCat = get_category($thisCat);
    $parentCat = get_category($thisCat->parent);
    if ($thisCat->parent != 0) echo(get_category_parents($parentCat, TRUE, ‘ ‘ . $delimiter . ‘ ‘));
    echo $currentBefore . single_cat_title() . $currentAfter;
    break;

    case is_page():
    // get the parent page id
    $parent_id = $post->post_parent;
    $breadcrumbs = array();
    if ($parent_id > 0 ) :
    // now loop through and put all parent pages found above current one in array
    while ($parent_id) {
    $page = get_page($parent_id);
    $breadcrumbs[] = ‘ID) . ‘”>’ . get_the_title($page->ID) . ‘‘;
    $parent_id = $page->post_parent;
    }
    $breadcrumbs = array_reverse($breadcrumbs);
    foreach ($breadcrumbs as $crumb) echo $crumb . ‘ ‘ . $delimiter . ‘ ‘;
    endif;
    echo $currentBefore . the_title() . $currentAfter;
    break;

    case is_search():
    echo $currentBefore . __(‘Search results for’, ‘appthemes’) .’ '’ . get_search_query() . ‘'’ . $currentAfter;
    break;

    case is_tag():
    echo $currentBefore . __(‘Posts tagged with’, ‘appthemes’) .’ '’ . single_tag_title(”, false) . ‘'’ . $currentAfter;
    break;

    case is_author():
    global $author;
    $userdata = get_userdata($author);
    echo $currentBefore . __(‘About’, ‘appthemes’) .’ ‘ . $userdata->display_name . $currentAfter;
    break;

    case is_day():
    echo ‘‘ . get_the_time(‘Y’) . ‘ ‘ . $delimiter . ‘ ‘;
    echo ‘‘ . get_the_time(‘F’) . ‘ ‘ . $delimiter . ‘ ‘;
    echo $currentBefore . get_the_time(‘d’) . $currentAfter;
    break;

    case is_month():
    echo ‘‘ . get_the_time(‘Y’) . ‘ ‘ . $delimiter . ‘ ‘;
    echo $currentBefore . get_the_time(‘F’) . $currentAfter;
    break;

    case is_year():
    echo $currentBefore . get_the_time(‘Y’) . $currentAfter;
    break;

    case is_archive():
    if( !empty($_GET[‘sort’]) && $_GET[‘sort’] == ‘random’ )
    echo $currentBefore . __(‘Random Ads’, ‘appthemes’) . $currentAfter;
    elseif( !empty($_GET[‘sort’]) && $_GET[‘sort’] == ‘popular’ )
    echo $currentBefore . __(‘Popular Ads’, ‘appthemes’) . $currentAfter;
    else
    echo $currentBefore . __(‘Latest Ads’, ‘appthemes’) . $currentAfter;
    break;

    case is_404():
    echo $currentBefore . __(‘Page not found’, ‘appthemes’) . $currentAfter;
    break;

    endswitch;

    if ( get_query_var(‘paged’) ) {
    if ( is_category() || is_day() || is_month() || is_year() || is_search() || is_tag() || is_author() || is_archive() || is_tax() ) echo ‘ (‘;
    echo __(‘Page’, ‘appthemes’) . ‘ ‘ . get_query_var(‘paged’);
    if ( is_category() || is_day() || is_month() || is_year() || is_search() || is_tag() || is_author() || is_archive() || is_tax() ) echo ‘)’;
    }

    echo ”;

    endif;

    }

    Save it and you should be up and running in seconds.
    Please note that if misdone the previous steps could break your website proceed with caution. Backup, Backup, backup.

    Abdullateef ALFozaie
    BAS. Electrical Engineering Suny Buffalo
    BS. Biomedical Sciences Suny Buffalo
    MD. Candidate Vita-Salute San Raffaele University Milan

    #26167
    Leah
    Member

    Thanks for the tips Abdullateef!

    #977914
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Fatal Error in Add Event and List Event Pages’ is closed to new replies.