boonebgorges / buddypress-docs

GNU General Public License v3.0
106 stars 44 forks source link

Associated Groups #566

Closed github-trh closed 6 years ago

github-trh commented 7 years ago

@boonebgorges All settings being equal, I am experiencing an issue where not all Groups are available to a user when attempting to associate a Doc with a particular Group. I may be overlooking something basic, but thought I would send a message since I am out of ideas. The user is a member with the same role in all Groups. Thank you in advance!

github-trh commented 7 years ago

This is an issue if you are attempting to create a new doc at the top level, not on a Group page. If you are on the Group page and you proceed to create a doc, the Group you want to associate it with shows up as an option.

boonebgorges commented 7 years ago

Are you seeing any groups at all? Is there a pattern, perhaps where hidden groups are not appearing in the list?

github-trh commented 7 years ago

I am seeing some groups, but not all. If a member is part of 5 groups, I may see 3 of them for example. I've compared and tried to find a pattern and logged in as different users too.

boonebgorges commented 7 years ago

Can you check to see whether there is a pattern of Hidden groups specifically?

Are you using any persistent object caching? Memcached, etc.

On 03/21/2017 11:52 AM, github-trh wrote:

I am seeing some groups, but not all. If a member is part of 5 groups, I may see 3 of them for example. I've compared and tried to find a pattern and logged in as different users too.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/boonebgorges/buddypress-docs/issues/566#issuecomment-288143474, or mute the thread https://github.com/notifications/unsubscribe-auth/AAPDYzZK3ILONxn1oDxRtPrGpBddpzwYks5roAA9gaJpZM4Mj2qC.

github-trh commented 7 years ago

Correction: There are also hidden groups for Admin.
I checked four users with the same permission levels and no pattern, it's almost random. What is visible/hidden for one user may not be for another. I have a user role editor plug in and I am going to see if that is causing the problem. No object caching being used.

github-trh commented 7 years ago

I deactivated all plugins that I could and the problem persists. Twenty Twelve child theme. Latest/greatest WP version. Still looking for the pattern, just not seeing it. I'm trying to recall when it was not an issue and I don't know if that was ever the case, this is a new intranet site and I'm just now up to 7 Groups and just started using the Docs plugin.

boonebgorges commented 7 years ago

Sorry you're having trouble - if you identify a pattern, please let me know.

For reference, here's where the groups are queried for the dropdown: https://github.com/boonebgorges/buddypress-docs/blob/master/includes/templatetags.php#L858

Looking over that function, your issue could be that certain groups have their "minimum role" setting different.

On 03/21/2017 01:37 PM, github-trh wrote:

I deactivated all plugins that I could and the problem persists. Twenty Twelve child theme. Latest/greatest WP version. Still looking for the pattern, just not seeing it. I'm trying to recall when it was not an issue and I don't know if that was ever the case, this is a new intranet site and I'm just now up to 7 Groups and just started using the Docs plugin.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/boonebgorges/buddypress-docs/issues/566#issuecomment-288177723, or mute the thread https://github.com/notifications/unsubscribe-auth/AAPDYyR70OIHNStnfvHW65tKWtjVswb9ks5roBkHgaJpZM4Mj2qC.

dcavins commented 7 years ago

If you only have 7 groups, try visiting the manage pane for each group, located at something like: groups/group-name/admin/docs/

and save the settings for each group. I suspect that will solve your problem. Please let us know if it does or doesn't. 👍

github-trh commented 7 years ago

@boonebgorges @dcavins I tried the save suggestion above but with no luck. It just dawned on me that months ago I used a language translate tool to replace the word "member" with the word "employee" since this is an intranet.
If I review the Group roles listed on the back end, their is a drop down option of "employee", and everyone is listed as such. When I go to the front end where dclavens suggested to make edits, the default for "Miinimum role to associate Docs with this group" is Member. When I changed it to Moderator or Admin, the option for Member completely goes away. Bottom line, I think I jacked up something with trying to replace the word Member with Employee throughout the site!

boonebgorges commented 7 years ago

That is really interesting - thank you for tracking it down. I'll take a look at our internal code to see if there's something we can do to be more resilient about the way these checks work.

Just to clarify: did your translation tool change the plugin files, or is it generating a language pack that changes the language used on the front-end of the site?

On 03/21/2017 04:38 PM, github-trh wrote:

@boonebgorges https://github.com/boonebgorges @dcavins https://github.com/dcavins I tried the save suggestion above but with no luck. It just dawned on me that months ago I used a language translate tool to replace the word "member" with the word "employee" since this is an intranet. If I review the Group roles listed on the back end, their is a drop down option of "employee", and everyone is listed as such. When I go to the front end where dclavens suggested to make edits, the default for "Miinimum role to associate Docs with this group" is Member. When I changed it to Moderator or Admin, the option for Member completely goes away. Bottom line, I think I jacked up something with trying to replace the word Member with Employee throughout the site!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/boonebgorges/buddypress-docs/issues/566#issuecomment-288227341, or mute the thread https://github.com/notifications/unsubscribe-auth/AAPDYzAtJ7OREas_bJwy8DXYtRxbuDFnks5roENugaJpZM4Mj2qC.

github-trh commented 7 years ago

It was something called Po-edit and I am pretty certain I created new .mo and .po files in a new folder inside wp-content after doing the word search/replace. I just now tried removing those two files from the folder and tried again with no luck on Groups becoming visible...so I'm not sure if there is anything to this rabbit chase.

github-trh commented 7 years ago

Reinstalled Docs, reverted back to pre-translate (members-to-employee swap) and still the same problem with not all Groups being shown for a doc to be attached to. Will try to create brand new Group, join a few folks and see if there is something there....

dcavins commented 7 years ago

You can get a clear idea of what groups are being included by modifying includes/templatetags.php like this: https://gist.github.com/dcavins/e00823d139084a226b99d4414e69b6e6

The debug statements here should be added in the function bp_docs_associated_group_dropdown() as @boonebgorges pointed you to here: https://github.com/boonebgorges/buddypress-docs/blob/master/includes/templatetags.php#L858

github-trh commented 7 years ago

Guys, let me start by saying that I am not a coder. I mess around with CSS styling, and occasionally I'm brave enough to copy/paste some code into a php file to see what will happen. I discovered what happened here and it was self-inflicted. Several months ago, I edited the css file to control what is displayed in the Activity filter in the stream (option: nth-child(5)...display none, etc...) When I removed this edit from the css file, my issue with associating a doc to Groups went away. All Groups appear. In addition, I am no longer having issues with posting directly to a Group a member belongs to. Not all Groups were being displayed when posting in the activity stream. All is well now. My apologies for wasting anyone's time here.

boonebgorges commented 7 years ago

Thanks for following up. Your explanation makes the whole thing make sense :-D

On 03/31/2017 08:51 AM, github-trh wrote:

Guys, let me start by saying that I am not a coder. I mess around with CSS styling, and occasionally I'm brave enough to copy/paste some code into a php file to see what will happen. I discovered what happened here and it was self-inflicted. Several months ago, I edited the css file to control what is displayed in the Activity filter in the stream (option: nth-child(5)...display none, etc...) When I removed this edit from the css file, my issue with associating a doc to Groups went away. All Groups appear. In addition, I am no longer having issues with posting directly to a Group a member belongs to. Not all Groups were being displayed when posting in the activity stream. All is well now. My apologies for wasting anyone's time here.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/boonebgorges/buddypress-docs/issues/566#issuecomment-290717726, or mute the thread https://github.com/notifications/unsubscribe-auth/AAPDY82yn0BkRETgKz_xrK7FT9PHGvwXks5rrQT-gaJpZM4Mj2qC.