Resolve cubepoints page not found error in buddypress 1.7 upgrade

Cubepoints integration with buddypress was really very nice and smooth even upto buddypress 1.6.5. But when the bussypress version 1.7 was released, almost everyone start getting the “Page Not Found (404)” error after upgrading. For that, many people are not being able to upgrade their buddypress or they are degrading their versions.

But I’ve found out a very easy and effective way to solve this problem with 3 lines of php code. Now you can easily upgrade your buddypress to 1.7 and after that just follow the following steps and it will work fine.

Step 1: Goto “wp-contents/plugins/cubepoints-buddypress-integration/includes” folder.

Step 2: Open the “bp-cubepoint-core.php” file.

Step 3: go to line number 45. It looks like,

global $bp, $wpdb;

$bp->cubepoint->id = 'cubepoint';
$bp->cubepoint->table_name = $wpdb->base_prefix . 'cubepoints';
$bp->cubepoint->table_name = $wpdb->prefix . 'cubepoints';

Step 4: Add the following 3 lines.

global $bp, $wpdb;

//The following 3 lines fixes the 1.7 upgrade. Code by voidcanvas.com
if( !is_object( $bp->cubepoint ) )
{
   $bp->cubepoint = new stdClass;
}

$bp->cubepoint->id = 'cubepoint';
$bp->cubepoint->table_name = $wpdb->base_prefix . 'cubepoints';
$bp->cubepoint->table_name = $wpdb->prefix . 'cubepoints';

Hope this will help you to resolve your problem

About This Author

Hello! I am Paul Shan, a JavaScript Expert, Full Stack and DevOps Engineer cum Consultant based out of Bengaluru, India.