Lampwrights Forum > Other Stuff > vBulletin Wordpress Bridge
Register Community Today's Posts Search

Reply
 
Thread Tools
06-24-2011, 05:39 PM   #1
maxaud
Junior Member
 
Join Date: Jun 2011
Location: North Idaho
Posts: 10
Rep Power: 0
maxaud is getting browny points
You do not have sufficient permissions to access this page - after plugin activation

I'm getting the "You do not have sufficient permissions to access this page." after activating the plugin and am trying to access any of the setting pages.

Note, this is before even adjusting a single setting.

I uploaded the plugin (kept /vbbridge/ directory intact).
I clicked activate in the WordPress plugin page.
I navigate to any of these pages and it gives me the error:
- Settings->Vbridge Settings
- Tools->Convert WordPress users
- Users->Vbridge User settings

The following line is still commented out in the file:
#define('USE_ADMINCP_BRIDGE', true);

Note:
This is in a subdirectory install:
domain.com/wordpress/wp-content/plugins/vbbridge/vbbridge.php
Fresh install of WordPress 3.1.3
maxaud is offline   Reply With Quote

06-24-2011, 06:15 PM   #2
maxaud
Junior Member
 
Join Date: Jun 2011
Location: North Idaho
Posts: 10
Rep Power: 0
maxaud is getting browny points
Tried it in a different WordPress install that is in the root of a different domain and I can get to the settings pages. It's using Wordpress 3.0.1

Summary | Seems to work with the following:
- Different WordPress version
- Not in a subdirectory install

Last edited by maxaud; 06-24-2011 at 06:18 PM.
maxaud is offline   Reply With Quote
06-24-2011, 09:14 PM   #3
maxaud
Junior Member
 
Join Date: Jun 2011
Location: North Idaho
Posts: 10
Rep Power: 0
maxaud is getting browny points
seems to be a wordpress issue..

The following code wont work as a new plugin for adding an admin page..

PHP Code:
<?php
/*
Plugin Name: Test Plugin
Plugin URI: http://testing.com
Description: Testing some things
Version: .1
Author: Test Author
Author URI: http://www.nodomain.com/
*/ 


add_action('admin_menu''my_plugin_menu');

function 
my_plugin_menu() {
    
add_options_page('My Plugin Options''My Plugin''manage_options''my-unique-identifier''my_plugin_options');
}

?>
maxaud is offline   Reply With Quote
06-24-2011, 09:43 PM   #4
maxaud
Junior Member
 
Join Date: Jun 2011
Location: North Idaho
Posts: 10
Rep Power: 0
maxaud is getting browny points
Ok, new issue. I figured out that something was using chdir() to change the working directory which was causing the permission issues.
Now when I activate the plugin it brings me back to the WordPress login page. No credentials work to log in, WordPress or vBulletin.
If I uncomment the USE_ADMINCP_BRIDGE line I can log in via vBulletin creds but it gives me a permission error.
Alternatively I can delete the plugin and get back into the WordPress backend.
maxaud is offline   Reply With Quote
06-24-2011, 10:45 PM   #5
maxaud
Junior Member
 
Join Date: Jun 2011
Location: North Idaho
Posts: 10
Rep Power: 0
maxaud is getting browny points
I added the following in the wp_set_current_user function and it allowed me to get into the admin panel with the plugin active. I can now edit the usergroup settings to map vb groups to wp user levels.

Note: usergroup 6 is the usergroup for admins on my vbulletin

PHP Code:
    if ( $current_user->data->usergroupid == ) {
        
$current_user->data->pages_capabilities['administrator'] = 1;
        
$current_user->caps['administrator'] = 1;
        
$current_user->pages_capabilities['administrator'] = 1;
        
$current_user->pages_user_level 10;
        
$current_user->user_level 10;
        
$current_user->roles[] = "administrator";
        
$current_user->allcaps['switch_themes'] = 1;
        
$current_user->allcaps['edit_themes'] = 1;
        
$current_user->allcaps['activate_plugins'] = 1;
        
$current_user->allcaps['edit_plugins'] = 1;
        
$current_user->allcaps['edit_users'] = 1;
        
$current_user->allcaps['edit_files'] = 1;
        
$current_user->allcaps['manage_options'] = 1;
        
$current_user->allcaps['moderate_comments'] = 1;
        
$current_user->allcaps['manage_categories'] = 1;
        
$current_user->allcaps['manage_links'] = 1;
        
$current_user->allcaps['upload_files'] = 1;
        
$current_user->allcaps['import'] = 1;
        
$current_user->allcaps['unfiltered_html'] = 1;
        
$current_user->allcaps['edit_posts'] = 1;
        
$current_user->allcaps['edit_others_posts'] = 1;
        
$current_user->allcaps['edit_published_posts'] = 1;
        
$current_user->allcaps['publish_posts'] = 1;
        
$current_user->allcaps['edit_pages'] = 1;
        
$current_user->allcaps['read'] = 1;
        
$current_user->allcaps['level_1;0'] = 1;
        
$current_user->allcaps['level_9'] = 1;
        
$current_user->allcaps['level_8'] = 1;
        
$current_user->allcaps['level_7'] = 1;
        
$current_user->allcaps['level_6'] = 1;
        
$current_user->allcaps['level_5'] = 1;
        
$current_user->allcaps['level_4'] = 1;
        
$current_user->allcaps['level_3'] = 1;
        
$current_user->allcaps['level_2'] = 1;
        
$current_user->allcaps['level_1;'] = 1;
        
$current_user->allcaps['level_0'] = 1;
        
$current_user->allcaps['edit_others_pages'] = 1;
        
$current_user->allcaps['edit_published_pages'] = 1;
        
$current_user->allcaps['publish_pages'] = 1;
        
$current_user->allcaps['delete_pages'] = 1;
        
$current_user->allcaps['delete_others_pages'] = 1;
        
$current_user->allcaps['delete_published_pages'] = 1;
        
$current_user->allcaps['delete_posts'] = 1;
        
$current_user->allcaps['delete_others_posts'] = 1;
        
$current_user->allcaps['delete_published_posts'] = 1;
        
$current_user->allcaps['delete_private_posts'] = 1;
        
$current_user->allcaps['edit_private_posts'] = 1;
        
$current_user->allcaps['read_private_posts'] = 1;
        
$current_user->allcaps['delete_private_pages'] = 1;
        
$current_user->allcaps['edit_private_pages'] = 1;
        
$current_user->allcaps['read_private_pages'] = 1;
        
$current_user->allcaps['delete_users'] = 1;
        
$current_user->allcaps['create_users'] = 1;
        
$current_user->allcaps['unfiltered_upload'] = 1;
        
$current_user->allcaps['edit_dashboard'] = 1;
        
$current_user->allcaps['update_plugins'] = 1;
        
$current_user->allcaps['delete_plugins'] = 1;
        
$current_user->allcaps['install_plugins'] = 1;
        
$current_user->allcaps['update_themes'] = 1;
        
$current_user->allcaps['install_themes'] = 1;
        
$current_user->allcaps['update_core'] = 1;
        
$current_user->allcaps['list_users'] = 1;
        
$current_user->allcaps['remove_users'] = 1;
        
$current_user->allcaps['add_users'] = 1;
        
$current_user->allcaps['promote_users'] = 1;
        
$current_user->allcaps['edit_theme_options'] = 1;
        
$current_user->allcaps['delete_themes'] = 1;
        
$current_user->allcaps['export'] = 1;
        
$current_user->allcaps['administrator'] = 1;
    } 
maxaud is offline   Reply With Quote
06-25-2011, 03:22 AM   #6
maxaud
Junior Member
 
Join Date: Jun 2011
Location: North Idaho
Posts: 10
Rep Power: 0
maxaud is getting browny points
Seems like I can log in with different users and I can change the vbb settings but I cannot change WordPress settings. Know why this may be?
maxaud is offline   Reply With Quote
06-27-2011, 07:22 PM   #7
maxaud
Junior Member
 
Join Date: Jun 2011
Location: North Idaho
Posts: 10
Rep Power: 0
maxaud is getting browny points
Looks to be a conflict with the database objects.

When WordPress is using $wpdb->get_results within "/wp-admin/options.php" it's trying to use the vBulletin database rather than the WordPress database. Seems to be only related to WordPress options..
maxaud is offline   Reply With Quote
06-27-2011, 07:38 PM   #8
maxaud
Junior Member
 
Join Date: Jun 2011
Location: North Idaho
Posts: 10
Rep Power: 0
maxaud is getting browny points
Copied the WordPress database to the vBulletin database and changed the database reference in wp-config.php and I can now adjust settings.

I see this as a temporary fix for now as I need these two databases separated.

How do I make sure it's not conflicting while having them separate?
maxaud is offline   Reply With Quote
06-28-2011, 08:21 AM   #9
Jeff
Administrator
 
Jeff's Avatar
 
Join Date: Jul 2010
Posts: 402
Rep Power: 10
Jeff is getting browny points
There really is no way for the $wpdb to somehow start using the vbulletin database. Not sure what modifications you have made but I think your assumption here is wrong.
Jeff is offline   Reply With Quote
06-28-2011, 12:47 PM   #10
maxaud
Junior Member
 
Join Date: Jun 2011
Location: North Idaho
Posts: 10
Rep Power: 0
maxaud is getting browny points
When I do a var_dump($wpdb) in admin notices section of the backend it tells me the last mysql error that was generated and it states that the "vbulletin_db.wp_options" table doesn't exist.

When I change WordPress to use the same database it starts to work so something is obviously getting confused.

Couldn't vBulletin have a similar variable name that could be conflicting?

Have you tried it from two separate databases before and tried modifying options?
maxaud is offline   Reply With Quote
06-29-2011, 05:38 AM   #11
Jeff
Administrator
 
Jeff's Avatar
 
Join Date: Jul 2010
Posts: 402
Rep Power: 10
Jeff is getting browny points
There is no conflicting variable. On almost every install I use this on, the db's are separate. Are you sure you do not have a plugin installed that is using the latest db connection instead of the $wpdb variable?
Jeff is offline   Reply With Quote
06-29-2011, 12:03 PM   #12
maxaud
Junior Member
 
Join Date: Jun 2011
Location: North Idaho
Posts: 10
Rep Power: 0
maxaud is getting browny points
It's the only plugin active. Weird.
maxaud is offline   Reply With Quote
Reply

Tags

vbulletin wordpress bridge



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
You do not have sufficient permissions to access this page venkat vBulletin Wordpress Bridge 2 06-24-2011 02:27 PM
You do not have sufficient permissions to access this page. qwert789 vBulletin Wordpress Bridge 3 03-16-2011 09:24 PM
Plugin activation error frack vBulletin Wordpress Bridge 2 03-02-2011 08:22 AM


All times are GMT -4. The time now is 02:19 AM.


Powered by vBulletin® Version 3.8.8 Beta 4
Copyright ©2000 - 2024, vBulletin Solutions, Inc.