Skip to:
Content
Pages
Categories
Search
Top
Bottom

Group API trouble since BuddyPress version 1.2.6

  • Avatar of imath
    imath
    Moderator

    @imath

    Hi there, this is just a warning : since 1.2.6 upgrade the part of the plugin that rely on the Group API is only working for group creators and super admin.
    It’s working fine with BuddyPress 1.2.5.2. I’m trying to figure out a way to fix my 1.2.6 issue.

Viewing 14 replies - 1 through 14 (of 14 total)
  • Avatar of imath
    imath
    Moderator

    @imath

    Avatar of Svenl77
    Svenl77
    Participant

    @svenl77

    Hi @imath, Thanks for the great plugin. I tried to fix it with the instructions from the ticket, but I couldn’t get it to work.

    Is there a way to fix it for 1.2.6? I just added it to my website without the knowledge of this bug, and now my members can’t use it. I really would love to have it working correctly… I have to turn it off and there are already snippets in there :-(

    Thanks Sven

    Avatar of imath
    imath
    Moderator

    @imath

    HI @svenl77,

    Personnaly, i still use BP 1.2.5.2..
    But I tried the fix on 1.2.6 and it’s working.

    open wp-content/plugins/buddypress/bp-groups/bp-groups-classes.php
    then on line 1198
    replace `if ( $this->enable_edit_item ) {`
    by
    `if ( $this->enable_edit_item && $bp->is_item_admin ) {`

    It should work.

    Avatar of Svenl77
    Svenl77
    Participant

    @svenl77

    Hi Imath, thanks for your reply, with the fix, it’s working for registered members, but if you are not logged in, the links are deactivated, and read more is missing.

    Avatar of imath
    imath
    Moderator

    @imath

    Hi Svenl77,

    Ok, i see the trouble. It’s not linked to BuddyPress version, it has always been the way the plugin works actually. If you are in Snippets Directory `siteurl/snippets` or `siteurl/user/snippets` and the user is not logged in then only the link to the group is activated.
    But if you are still not logged in and you go (by clicking on the link to the group for example i was talking on prev paragraph) in the `siteurl/slug-of-group/snippets` then the links are available and you can display the snippet.
    As far as i can remember i made this in case a group admin changes his group settings from public to hidden or private. So I need to make some test before doing any upgrade to see if there’s no troubles in this case.

    But If you want to remove this behavior, edit `wp-content/plugins/bp-code-snippets/home-code-snippets.php` this way :
    line 171 to 175 content to change :
    `loggedin_user->id, $snippet->id_group )):?>
    <a href="single/id_cs;?>/” title=””>snippet_title);?>

    snippet_title);?>
    `

    with this content :
    `<a href="single/id_cs;?>/” title=””>snippet_title);?>`

    hope it replied to your question.

    Avatar of Svenl77
    Svenl77
    Participant

    @svenl77

    Hi @imath, thanks for your great fast support! All works now like a charm!

    Avatar of imath
    imath
    Moderator

    @imath

    glad to read it ! and you’re welcome ;)

    Avatar of Svenl77
    Svenl77
    Participant

    @svenl77

    Hi @imath, after the update from wp 3.0.3 to 3.0.4 and buddypress 1.2.7 i thing a new bug popped up.

    If I try to add a snippet in the forum as a normal user, the user profile is opened in the add-snippet-window.

    As admin all works great. Thanks, Sven

    Avatar of imath
    imath
    Moderator

    @imath

    hi @Svenl77,

    i’ve tested on WP 3.0.4 (with and without network activated) + BP 1.2.7 and nothing of what you said happened ???
    When you say a normal user, you mean a logged-in subscriber ?
    What happens exactly ?
    1. the thickbox opens and inside the profile page of the user is displayed ?
    2. the thickbox doesnt open and instead it’s the profile page ?

    Is this happening in `siteurl/forums/` or in `siteurl/groups/group-slug/forum/` ?
    Is this happening when you add a topic, when you add a reply or when you edit a reply or a topic ?

    if you browse the source code is the code of the add snippet button looks like this :
    `<a href=”http://siteurl/wp-content/plugins/bp-code-snippets/bp-cs-snippet-selector.php?type=forum-reply&tab=add&TB_iframe=true&height=500&width=640″ class=”thickbox button” title=”Add Snippet”>Add Snippet</a>` ?

    This is really weird, because 4 me everything works fine !

    Avatar of Svenl77
    Svenl77
    Participant

    @svenl77

    Hi @imath,

    sorry for the late reply. I needed to deactivate my plugins ones by ones, to find the conflict.
    It was the s2member plugin which makes the conflict. I will try now to find out a way to fix this.

    Thanks for your fast help.

    Avatar of imath
    imath
    Moderator

    @imath

    Hi @Svenl77,
    sorry to read that. Hope it will be easy to find the conflict, i’ll be interested to know what goes wrong and how you solve it !!

    Avatar of Svenl77
    Svenl77
    Participant

    @svenl77

    Hi @imath, I still wasn’t able to fix the bug, but I have one idea. I guess the jQuery has a problem or the redirect.
    The change log from s2Member can be found here. http://www.primothemes.com/readme/3679/#rm-changelog . Maybe it tels you more than me and you could point me in one direction.

    There is one other question I like to ask. Is it possible to delete snippets?
    I haven’t found a way as admin to delete snippets.

    Thanks again for the great plugin ;-)

    Avatar of imath
    imath
    Moderator

    @imath

    Hi @Svenl77 ,
    i’ll check the link to see if there’s a way to have the 2 plugins working 2gether..

    To delete snippets, you must be in the group where the snippet was dropped then admin will be able to delete it thanks to a link near its title.

    à plus tard ;)

    Avatar of Svenl77
    Svenl77
    Participant

    @svenl77

    thanks, searched but haven’t found it. I use the groups as container, and use snippets over the directory view. That’s why I never checked the group…

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

You must be logged in to reply to this topic.