AITpro (@aitpro)

Forum Replies Created

Viewing 22 replies - 1 through 22 (of 22 total)
  • @aitpro

    Participant

    Not a big deal to me at all. I’m perfectly fine with doing an occasional manual DB edit. Just thought I would mention it.

    @aitpro

    Participant

    I did a search on the BuddyPress site, but did not find any other forum topics. So I posted this new forum topic > https://buddypress.org/support/topic/split-forum-topic-secondary_item_id-db-row-not-updated/.

    Overall it’s not a big deal since I rarely split forum topics and manually editing the DB only takes a minute to do. πŸ˜‰

    @aitpro

    Participant

    @invoke_media_group – This forum topic does not have anything to do with your issue/problem. So please create a new forum topic for your different issue/problem. Also you should do standard troubleshooting steps first before posting your new forum topic: deactivate all other plugins to see if another plugin is causing the problem, comment out any custom functions you have created in your theme functions.php file, switch your current theme to a WordPress theme: 2017, 2016… When you post a bbPress forum topic you need to include these things: what WordPress version you have installed, bbPress version you have installed and what troubleshooting steps you have already performed.

    You should also probably include the relevant code in file: /bbpress/includes/core/template-function.php on line 316 (shown below) and that this function: bbp_get_template_stack() uses this filter: bbp_get_template_stack to Call the functions added to the ‘bbp_template_stack’ filter hook, and return an array of the template locations. There is also a related bug here that appears to have already been fixed: https://bbpress.trac.wordpress.org/ticket/2871

    	// Sort.
    	if ( class_exists( 'WP_Hook' ) ) {
    		$filter = $wp_filter[ $tag ]->callbacks;
    	} else {
    		$filter = &$wp_filter[ $tag ];
    
    		if ( ! isset( $merged_filters[ $tag ] ) ) {
    			ksort( $filter );
    			$merged_filters[ $tag ] = true;
    		}
    	}

    @aitpro

    Participant

    Also I don’t know if this function I created to add capabilities did anything in combination with deactivating and activating bbPress, but this function was in my Theme functions.php file during the process of doing the deactivation and activation. πŸ˜‰

    // bbPress Keymaster capabilities fix
    function aitpro_add_caps_bbp_keymaster_fix() {
    
    $capabilities = array( 
    		'keep_gate', 
    		'spectate', 
    		'participate', 
    		'moderate', 
    		'throttle', 
    		'view_trash', 
    		'publish_forums', 
    		'edit_forums', 
    		'edit_others_forums', 
    		'delete_forums', 
    		'delete_others_forums', 
    		'read_private_forums', 
    		'read_hidden_forums', 
    		'publish_topics', 
    		'edit_topics', 
    		'edit_others_topics', 
    		'delete_topics', 
    		'delete_others_topics', 
    		'read_private_topics', 
    		'publish_replies', 
    		'edit_replies', 
    		'edit_others_replies', 
    		'delete_replies', 
    		'delete_others_replies', 
    		'read_private_replies', 
    		'manage_topic_tags', 
    		'edit_topic_tags', 
    		'delete_topic_tags', 
    		'assign_topic_tags' 
    		//'test' 
    		);
    
        $role = get_role( 'bbp_keymaster' );
    	
    	foreach( $capabilities as $cap ) {
            $role->add_cap( $cap );
    	}
    }
    
    add_action( 'admin_init', 'aitpro_add_caps_bbp_keymaster_fix');

    @aitpro

    Participant

    Even funnier. All I had to do was deactivate and activate bbPress again. I usually do manual upload upgrading since in past versions of bbPress and BuddyPress my site would crash if I did a normal plugin update or even deactivating and activating bbPres and BuddyPress and I would have to restore the database. Anyway took a chance and no site crash and all capabilities were updated successfully. Yeah!

    @aitpro

    Participant

    The wierd thing is why would this have been an intermittent problem? That is going to be tricky thing to figure out. πŸ˜‰

    @aitpro

    Participant

    Eureka I found where the problem is. Yeah!

    On my Live site this is the DB value for wp_options > wp_user_roles is missing the “keep_gate” and all other capabilities.

    Live site DB value: s:13:"bbp_keymaster";a:2:{s:4:"name";s:9:"Keymaster";s:12:"capabilities";a:0:{}}

    Local Dev test site DB value: s:13:"bbp_keymaster";a:2:{s:4:"name";s:9:"Keymaster";s:12:"capabilities";a:29:{s:9:"keep_gate";b:1;s:8:"spectate";b:1;s:11:"participate";b:1;s:8:"moderate";b:1;s:8:"throttle";b:1;s:10:"view_trash";b:1;s:14:"publish_forums";b:1;s:11:"edit_forums";b:1;s:18:"edit_others_forums";b:1;s:13:"delete_forums";b:1;s:20:"delete_others_forums";b:1;s:19:"read_private_forums";b:1;s:18:"read_hidden_forums";b:1;s:14:"publish_topics";b:1;s:11:"edit_topics";b:1;s:18:"edit_others_topics";b:1;s:13:"delete_topics";b:1;s:20:"delete_others_topics";b:1;s:19:"read_private_topics";b:1;s:15:"publish_replies";b:1;s:12:"edit_replies";b:1;s:19:"edit_others_replies";b:1;s:14:"delete_replies";b:1;s:21:"delete_others_replies";b:1;s:20:"read_private_replies";b:1;s:17:"manage_topic_tags";b:1;s:15:"edit_topic_tags";b:1;s:17:"delete_topic_tags";b:1;s:17:"assign_topic_tags";b:1;}}

    @aitpro

    Participant

    Side Note Bonus: I did stumble across a solution for another problem that I could not figure out before, which is when I switched Themes my Theme stylesheet would no longer load and the Theme displayed without any CSS/broken. The problem is with this DB value: wp_options > template_root > the value was being updated with the full literal path to: C:\xampp\htdocs4\buddypress\wp-content\plugins\buddypress/bp-themes (on a Live Hosted site the path was also the full URL) and the value must be this relative path instead: /plugins/buddypress/bp-themes

    @aitpro

    Participant

    Oh well I give up for now. I can live without any bbPress backend menus since everything works fine on the frontend. I’ll probably look at this some other day. πŸ˜‰

    @aitpro

    Participant

    hmm the problem returned again. Ok so it is definitely Session/Cookie related, but there is some other factor involved here.

    @aitpro

    Participant

    yeah too funny huh? Went way way way too deeeeeeeeeeeeep on this one. ha ha ha. Anyway thanks again for getting me pointed in the right direction. Intermittent problems (menus appeared briefly then disappeared again) are always related to these types of things: php memory/cache/caching plugins/CDN’s/VPN’s/Proxy’s/Load Balancers/Host server problems (DNS server/DNS configuration problem, MySQL server timeout, server overloaded, etc), /Browser problems (corrupt cache, add-on, extension)/ISP (connectivity)/CloudFlare, etc.

    @aitpro

    Participant

    Oh my don’t I feel like a dummy. The problem is a Session/Cookie problem. You just need to clear all cookies/cache in your Browser back to a time before you upgraded to WP 4.7. ha ha ha πŸ˜‰

    @aitpro

    Participant

    @vcgs – All the bbPress backend menus disappeared again after I refreshed the Dashboard backend for the first time after creating the new administrator/keymaster user account. So that must mean the usermeta data is being updated somewhere “after the fact” and that is the root cause of the problem. Very Rough General Example: If WP version is X then update Y usermeta data. At least I know exactly where I should be looking. So thanks for that. πŸ˜‰

    @aitpro

    Participant

    @vcgs – Yep, that worked for me too. Thanks for that πŸ™‚ I had tried updating the existing keymaster user account, but did not think to try creating a new administrator user account and instead checked capabilities of the existing keymaster user account. Ok so the issue is a db option or value issue then most likely/logically in the wp_usermeta DB Table. What I will do in a little bit is compare the old existing keymaster user account db options and values to the newly created keymaster user account db options and values to see what is different. I assume that once I figure out what is different, a manual DB option or value can be created for any older administrator/keymaster Roles so that everything works for them too. Will post back here when I figure that out. thanks again vcgs πŸ™‚

    @aitpro

    Participant

    Nope not a theme or loader issue. Back to pokin around.

    @aitpro

    Participant

    I guess since no one else is reporting any problems then it must have something to do with my setup. So far eliminated any/all functions in my theme functions.php file. So maybe the 2017 theme trying to load was a clue. time to look at themes and loaders.

    @aitpro

    Participant

    I’m starting to think there is an “include” missing somewhere that is not loading the admin.php and actions.php files.

    @aitpro

    Participant

    So anyway as far as the DB is concerned I have all the necessary caps, which I expected. Still poking around in stuff.

        [switch_themes] => 1
        [edit_themes] => 1
        [activate_plugins] => 1
        [edit_plugins] => 1
        [edit_users] => 1
        [edit_files] => 1
        [manage_options] => 1
        [moderate_comments] => 1
        [manage_categories] => 1
        [manage_links] => 1
        [upload_files] => 1
        [import] => 1
        [unfiltered_html] => 1
        [edit_posts] => 1
        [edit_others_posts] => 1
        [edit_published_posts] => 1
        [publish_posts] => 1
        [edit_pages] => 1
        [read] => 1
        [level_10] => 1
        [level_9] => 1
        [level_8] => 1
        [level_7] => 1
        [level_6] => 1
        [level_5] => 1
        [level_4] => 1
        [level_3] => 1
        [level_2] => 1
        [level_1] => 1
        [level_0] => 1
        [edit_others_pages] => 1
        [edit_published_pages] => 1
        [publish_pages] => 1
        [delete_pages] => 1
        [delete_others_pages] => 1
        [delete_published_pages] => 1
        [delete_posts] => 1
        [delete_others_posts] => 1
        [delete_published_posts] => 1
        [delete_private_posts] => 1
        [edit_private_posts] => 1
        [read_private_posts] => 1
        [delete_private_pages] => 1
        [edit_private_pages] => 1
        [read_private_pages] => 1
        [delete_users] => 1
        [create_users] => 1
        [unfiltered_upload] => 1
        [edit_dashboard] => 1
        [update_plugins] => 1
        [delete_plugins] => 1
        [install_plugins] => 1
        [update_themes] => 1
        [install_themes] => 1
        [update_core] => 1
        [list_users] => 1
        [remove_users] => 1
        [promote_users] => 1
        [edit_theme_options] => 1
        [delete_themes] => 1
        [export] => 1
        [keep_gate] => 1
        [spectate] => 1
        [participate] => 1
        [moderate] => 1
        [throttle] => 1
        [view_trash] => 1
        [publish_forums] => 1
        [edit_forums] => 1
        [edit_others_forums] => 1
        [delete_forums] => 1
        [delete_others_forums] => 1
        [read_private_forums] => 1
        [read_hidden_forums] => 1
        [publish_topics] => 1
        [edit_topics] => 1
        [edit_others_topics] => 1
        [delete_topics] => 1
        [delete_others_topics] => 1
        [read_private_topics] => 1
        [publish_replies] => 1
        [edit_replies] => 1
        [edit_others_replies] => 1
        [delete_replies] => 1
        [delete_others_replies] => 1
        [read_private_replies] => 1
        [manage_topic_tags] => 1
        [edit_topic_tags] => 1
        [delete_topic_tags] => 1
        [assign_topic_tags] => 1
        [administrator] => 1
        [bbp_keymaster] => 1

    @aitpro

    Participant

    Another factor in the equation is that I can create new Topics and Replies on the frontend of the site. So it seems that whatever capabilities issue is going on it only affects /wp-admin/ ie is_admin().

    @aitpro

    Participant

    Wierd and wierder. Somehow WP wanted to use the 2017 theme and killed the site. When I went forward to 4.7 the 2017 theme was activated, but at least the site was loading again. Switched back to my theme and the site still loads. So I guess I have to live without bbPress menus until I can figure out what is wrong. πŸ˜‰

    @aitpro

    Participant

    LOL rolled the site back to WP 4.6.1 and the site is dead now. Got to love it. fun stuff πŸ™‚

    @aitpro

    Participant

    We were looking for a plugin that already did this and did not find what we wanted so we created this simple solution here: http://forum.ait-pro.com/forums/topic/buddypress-bbpress-social-media-share-button-code/

    This is lightweight HTML code outgoing Share links to keep website resource usage very low since the Social Media buttons are being loaded per Reply.

Viewing 22 replies - 1 through 22 (of 22 total)