Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: BP GroupBlog, P2 ready (with bugs)! Please review…


Anointed
Participant

@anointed

I’ve had an ongoing problem with the blog page titles and article titles not showing up on the group blog homepage. It turns out it was a conflict with the events-manger plugin.

In the events-manager plugin file: dbem_events.php there is the following function which causes the issue. Now I don’t know why, or what the proper fix is, but by commenting out the filter on ‘the_title’ I was able to get the blog titles back.

I hope this helps someone in the future as this took me days to track down.

function dbem_events_page_title($data) {
$events_page_id = get_option ( 'dbem_events_page' );
$events_page = get_page ( $events_page_id );
$events_page_title = $events_page->post_title;

if (($data == $events_page_title) && (is_page ( $events_page_id ))) {
if (isset ( $_REQUEST ['calendar_day'] ) && $_REQUEST ['calendar_day'] != '') {

$date = dbem_sanitize_request($_REQUEST ['calendar_day']);
$events_N = dbem_events_count_for ( $date );

if ($events_N == 1) {
$events = dbem_get_events ( "", dbem_sanitize_request($_REQUEST ['calendar_day']));
$event = $events [0];
$stored_page_title_format = get_option ( 'dbem_event_page_title_format' );
$page_title = dbem_replace_placeholders ( $stored_page_title_format, $event );
return $page_title;
}

}

if (isset ( $_REQUEST ['location_id'] ) && $_REQUEST ['location_id'] |= '') {
$location = dbem_get_location ( dbem_sanitize_request($_REQUEST ['location_id']) );
$stored_page_title_format = get_option ( 'dbem_location_page_title_format' );
$page_title = dbem_replace_locations_placeholders ( $stored_page_title_format, $location );
return $page_title;
}
if (isset ( $_REQUEST ['event_id'] ) && $_REQUEST ['event_id'] != '') {
// single event page
$event_ID = dbem_sanitize_request($_REQUEST ['event_id']);
$event = dbem_get_event ( $event_ID );
$stored_page_title_format = get_option ( 'dbem_event_page_title_format' );
$page_title = dbem_replace_placeholders ( $stored_page_title_format, $event );
return $page_title;
} else {
// Multiple events page
$page_title = get_option ( 'dbem_events_page_title' );
return $page_title;

}

} else {
return $data;
}

}
// to make sure that in pages lists the title is dbem_events_page_title, and not overwritten by the previous filter
//add_filter ( 'the_title', 'dbem_events_page_title' );
add_filter ( 'single_post_title', 'dbem_events_page_title' );

You can see that I commented out the second to last line.

So far it seems that the events plugin still works perfectly, as does the group blog plugin.

anyhow, hope it helps someone out.

Skip to toolbar