Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Author David Dean

    (@ddean)

    Hi WPChina,

    What version of the plugin are you using? In the latest version, 1.2.1, line 283 is a closing brace.

    Thread Starter WPChina

    (@wordpresschina)

    Hi,
    Thanks for your help~

    I am currently on 1.2.1. In bp-group-hierarchy/bp-group-hierarchy-classes.php I see this on lines 281-293:

    function __isset($varName) {
    		return array_key_exists($varName,$this->vars);
    	}
    
    	function __set($varName, $value) {
    		$this->vars[$varName] = $value;
    	}
    
    	function __get($varName) {
    		if(array_key_exists($varName,$this->vars))
    			return $this->vars[$varName];
    		return false;
    	}

    Is that not correct?

    Tks~

    Plugin Author David Dean

    (@ddean)

    That looks right to me. 🙂

    Can you provide more details about where this error is occurring? The code your error references is a magic method, so I need more information on the context. If you could find out where exactly on the page the error occurs, that would be a great start.

    I’ve taken a look at the BP Group Management code for this page, but don’t see anything that should be exposing an issue.

    Thread Starter WPChina

    (@wordpresschina)

    Hi, I wanted to send you an image of the screen but pastebin does not allow me to add that. In that case, here is where it appears:

    1) I first click on the Group Management section, which is at this url:
    wp-admin/network/admin.php?page=bp-group-management

    2) Then I see the list of Groups, so under one of the Groups I click the Members link to go view the members of that group.

    3) I am now taken to this url (the 35 on the end is the group id number):
    wp-admin/network/admin.php?page=bp-group-management&action=edit&id=35

    4) This url’s page is where the error is seen. Next to each member’s avatar image (i.e. John Smith), I see this:

    John Smith – Kick & Ban | Promote to Moderator | Promote to Admin
    Warning: array_key_exists() [function.array-key-exists]: The second argument should be either an array or an object in /var/www/sitename/data/www/sitename.com/bp/wp-content/plugins/bp-group-hierarchy/bp-group-hierarchy-classes.php on line 290
    Email status: No Email. Change to: No Email | Weekly | Daily | New Topics | All Email

    So you see that error is nestled between other text and links that should be there.

    Pls let me know what else I can do to help troubleshoot this~ Again, many thanks for your assistance.

    Plugin Author David Dean

    (@ddean)

    That screenshot was the key!

    I’ve done some quick testing and it looks like this is actually an issue between BP Group Management and the Group Email Subscription plugin. Even with BP Group Hierarchy disabled, the links for “No Email,” “Weekly,” etc., are wrong. I’m seeing links like this: `/groups//admin/manage-members/email/no/2?_wpnonce=f57842798f’. Can you confirm or deny this for your install?

    The double slashes where the group slug should be are the giveaway.

    No matter what, the $groups_template object isn’t filled the way Group Email Subscription is expecting. BP Group Hierarchy is just chattier than the stock groups handler. 🙂

    I’ll suppress the error message in the next version.

    Thread Starter WPChina

    (@wordpresschina)

    Yes, exactly, I see this on the links:
    /groups//admin/manage-members/email/no/19?_wpnonce=05ef452836

    And if a link is clicked, an error like this appears:

    Warning: array_key_exists() [function.array-key-exists]: The second argument should be either an array or an object in /var/www/sitename.com/data/www/sitename/bp/wp-content/plugins/bp-group-hierarchy/bp-group-hierarchy-classes.php on line 290

    Warning: Cannot modify header information – headers already sent by (output started at /var/www/sitename/data/www/sitename.com/bp/wp-content/plugins/bp-group-hierarchy/bp-group-hierarchy-classes.php:290) in /var/www/sitename/data/www/sitename.com/bp/wp-includes/pluggable.php on line 934

    So where should I go from here? When you say supress that error message you mean you will stop it from showing, but the links will still be bad because of the conflict between BP Group Management and the Group Email Subscription plugin? Shall I contact the BP Group Management and the Group Email Subscription developers? I am happy to do so~

    I get a similar error.

    PHP Warning: array_key_exists() expects parameter 2 to be array, null given in /home/sitename/public_html/wp-content/plugins/bp-group-hierarchy/bp-group-hierarchy-classes.php on line 290

    But I have completely deactivated and deleted both BP Group Management and BP Group Email. I also tried deleting the BP Group Hierarchy plugin files via FTP and reuploaded them. Still getting that same error anytime I visit any page on the site.

    Plugin Author David Dean

    (@ddean)

    WendellH – where are you seeing this error? It doesn’t sound related to the one described by WPChina.

    WPChina – that’s correct. All I can do is suppress the error message; I cannot correct the links.

    Thread Starter WPChina

    (@wordpresschina)

    @ddean: that is understandable and makes sense. Ok I will have more time in the next week to do some prodding of both the code and the other devs~

    @DavidDean: sorry about that, I should have specified that it is appearing in the error.log file in my root directory.

    Plugin Author David Dean

    (@ddean)

    @wendellh – unfortunately, that isn’t very helpful. If you knew even which page was triggering the error, that would be a good start for troubleshooting.

    @DavidDean: Yeah, after re-reading my post, I can see how that wasn’t helpful. But I did get the problem somewhat resolved… I was using the BP Links plugin, which was causing a number of problems with other BP plugins. Removing it cured all problems.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘[Plugin: BP Group Hierarchy] Conflict with BP Group Management plugin….’ is closed to new replies.