Resources

My Agape try

Your Agape try


Support Forum

You must be logged in to post Login Register

Search 
Search Forums:


 




Role scoper and Subscribe2

UserPost

1:18 pm
December 25, 2008


J

Member

posts 15

21

Hello,

doing a similar test as just above, with RS-1-rc6 showed probant results :

  • adding or removing categories, and assigning or removing the read capability to groups
  • updating from the role page, and hitting refresh on the user page 

showed or hid the categories accordingly.

J.

1:27 pm
December 25, 2008


J

Member

posts 15

22

Ah ! But !

User02 has read properties (through the group he belongs too) on the following categories

Cat1 : yes

Cat2 : yes

Cat2.1 : no

Cat2.2 : yes

Cat2.3 : no

Cat3 : no

He won't see Cat2.1 or 2.3 under the category module, on the front page - hence, won't be able to read it. Though, in his subscribe2 profile, he'll be able to subscribe to any of the categories his group is a reader to.

Greetings,

J.

1:43 pm
December 25, 2008


J

Member

posts 15

23

Oups, it seems to me that installing rc5 or rc6 messed up the existing group-category assignation … i had to recreate many (strangely enough, not all) access rights, which were deleted as i switch from rc4 to rc5/rc6

why is that - anyways, be aware^^

J.

(later)

*eeeeeek* ! and it won't let me reassign groups to category ! As i try, RS says, “Role Assignments Updated: 1 role selection for 1 group”, but the association won't appear on the page. Logging a test user of that group shows that the association wasn't saved. Switching back to rc4 allowed me to reassociate groups and categories. Courage, Kevin !

4:03 pm
December 26, 2008


Kevin

Admin

posts 2503

24

I e-mailed you about taking a closer look at your groups since I haven't been able to reproduce this.

RC5 adds the following query to delete any orphaned group roles (roles whose groups were deleted while RS was deactivated or in prev versions when RS wasn't paying attention):

DELETE FROM wp_user2role2object_rs WHERE group_id >= '1′ AND group_id NOT IN ( SELECT ID FROM wp_groups_rs )

There is a preceding check to ensure the groups table and ID column are valid. I don't see why this would delete any roles for existing groups, but unless we can explain it I will remove that maintenance feature from the next RS release.

So far I can't reproduce or explain the failed group role assignment at all, except that there seems to be a common thread of some problem with the storage/retrieval of your group IDs.

4:07 pm
December 26, 2008


Kevin

Admin

posts 2503

25

Thanks for that thorough instructions regarding your erratic Subscribe2 category visibility. I’ll try to walk through it later tonight.

Meanwhile, here’s something else to look into. The category hierarchy is “cached” to the database options table: category_children category_children_rs

I haven’t looked into it yet, but while you’re in testing mode those would be worth blowing away periodically to eliminate another potential culprit.

If you want to do it in code: delete_option(’category_children’); delete_option(’category_children_rs’);

11:17 pm
December 26, 2008


Kevin

Admin

posts 2503

26

Okay, I think I nailed this one - try the updated development snapshot, now RC6-8c27

The Persistent Cache for Group Roles was not flushed following a change in a group’s assignment(s). That explains why your Category Role Assignments and Unassignments did not take effect. This appears to be a longstanding bug ( (PHP lesson: an array with one null-valued element does not evaluate false.) I’m surprised this didn’t trip up anyone else before, sorry I didn’t find it myself, and thankful that you reported it.

However, I cannot find any hint of your last two symptoms.

My only thought on the apparant inability to assign new Category roles to a group: Are you sure the assignment mode dropdown was set to “assign” and not “remove”? Please let me know if this symptom proves authentic.

I haven’t reproduced or explained your reported lost role assignments either, so I disabled the non-essential “orphan-deletion” maintenance code until I have more time to prove it out.

9:33 am
May 28, 2009


Josti

Member

posts 4

27

Hello,

I hope it is ok to "hijack" this thread.

I am using Role Scoper successfully having a priviliged Member Group which has exclusive access to a hidden category.

Know I'm planning to add post notification via Subscribe2-Plugin. It's working so far, with one big exception: Whenever a new post is commited to the "exclusive" category, every registered member is notified via email, even he is not in the privileged group. Subscribe2 seems not to da a check of the Member Group. I tried fixing it in the subscribe2 code without success, perhaps anyone here could be a big help for me


Thanks for help in advance ;)

10:04 am
May 28, 2009


YikYak

Member

posts 70

28

Hi,

As I understand it Subscribe2 will not understand the concept of groups, it just sends emails notifications according to each users settings/preferences, or maybe according to the default subscribe2 settings.

with subscribe2 sers are allowed to subscribe to named categories, or it may be that they are automatically subscribed to named categories in some way. The way I set things up in my blog is the users are not auto subscribed to anything, they must visit their profile pages and choose which categories to subscribe to. According to role scoper, they will then only see the categories for subscription that they can normally see in the blog, so I expect in this way regular users will not be able to choose to subscribe to your exclusive category.

But it may be something in subscribe2 settings, say under the auto-subscription settings, that means users are automatically subscribed to your exclusive category by default, even if they cannot do it for themselves. You can add extra protection and modify the subscribe2 templates (also in settings) so that the POST content is not sent with the emails, just such things as title, permalink.

I would suggest you have a play with the subscribe2 settings, though I am not sure what might happen to existing users who are now subscribed, if they cannot see the category might not be able to unsubscribe, and you might not be able to easily do it for them. Might need a database clearout of some sort. You might to try some support from the subscribe2 guys, they seem helpful.

Hope that helps a bit.

YikYak

11:52 am
May 28, 2009


Josti

Member

posts 4

29

Thanks for your fast reply.

Seems I have to get my hands dirty modifying subscribe2 code. I'll post my results if successful.

3:44 pm
May 28, 2009


YikYak

Member

posts 70

30

I think you should be able to do it with just the normal plugin options page, that's what I meant by settings. It works for me, I have a number of users who each have a unique category that only they (and admin) can read and write to - this part is governed by Role Scoper settings. Each of my users can use subscribe2, and each gets the chance to subscribe to "public" categories and their own category, they cannot subscribe to other users restricted categories, have a play I think you'll make it work with a little experimenting.

11:42 pm
June 23, 2010


Kaliceos

Member

posts 5

31

Hello,

I'm having the same issue than the first post when using RS v1.2.5 with Subscribe2 v5.8. Subscribers don't see the list of categories to subscribe/unsubscribe when RS is activated.


I guess it's related with the get_categories function. Is there a way to fix that ?


Thanks

3:58 pm
June 24, 2010


Kevin

Admin

posts 2503

32

Can you tell me more about your configuration, especially any customized Role Scoper options?

I tried this out on default WP 2.9.2 and WP 3.0 installations, and don't see any problem.

8:08 am
June 25, 2010


Kaliceos

Member

posts 5

33

I'm using Role Scoper to restrict access to a category (wich is a child category). Only members (with the role of Subscriber) can read articles in that category. I don't use any other restriction. So I have one category with restricted access for all roles and access in reading role for WP Subscribers.

If I set Subscribers an other role for the category, the list of categories still doesn't appear in Subscriptions page of Subscribe2. I've tried to unrestrict category and unset roles for them and the problem is still here.


I tried on a fresh install of WP 3.0 with last versions of RS and Subscribe2 and the list of categories appear. So I created the same categories than my other case. If I restrict one category, the list appears without the restricted category. Until there, everything is OK. The minimum role for the restricted category to be listed in Subscriptions page is "Read private posts". That would be better with the "Read" role but I'll deal with that. I don't know why it has to be "Read private posts", is it Role Scoper related ?

Now I have to find what causes the problem in my configuration but for sure, it's not a Role Scoper problem.


Thanks.

12:34 pm
August 9, 2010


Kaliceos

Member

posts 5

34

Hi,

I'm back with the same problem, the list of categories doesn't show in the Subscriptions page of Subscribe2 for WP Subscribers with the following environment : WP 3.0 & RS 1.2.7. I'm using only one restricted category, WP Subscribers have access (Reading a private post) to it, and there's also a public category and Uncategorized. That way, guests will not see posts in this restricted category. I also use some restrictions on a few pages.

When a user registers, Subscribe2 is not able to subscribe him to the restricted category even if I choose to automatically subscribe new users to all categories. Is that normal ?

Then, if the user wants to subscribe/unsubscribe, he can't see the categories in Subscriptions page.

What is strange is that when I give a user the Author role, he can access to the list of the categories and if I give him back the Subscriber role, he keeps his access to the list of categories in the Subscriptions page. I have not specified anything related to the Author role in Role Scoper. If I give the user the Author role and if he doesn't access the Subscriptions page while he is an author, when I give him back the Subscriber role, he has not access to the categories.

Do you have any idea on that problem ? Do you want me to do some more investigation ? That's not a big deal, because it's a little website, but that would be perfect if those 2 plugins worked together.

Thank you for your great plugin.


A french user ;-)

1:42 pm
August 25, 2010


Kevin

Admin

posts 2503

35

I am unable to recreate any of these errors with WP 3.0.1, Subscribe2 5.9 and Role Scoper 1.2.7

I followed your configuration instructions: several categories, only one of them restricted, WP Subscriber group has Post Editor role in restricted category.

With that configuration in place, new Subscribers are successfully auto-subscribed to all categories and see all category checkboxes in their wp-admin dashboard. Unless you can identify some other variable in the makeup of that site, I don't know where else to look.


About the Agapetry forum

Currently Online:

16 Guests

Maximum Online: 150

Forums:

Groups: 2

Forums: 7

Topics: 1249

Posts: 5659

Members:

There are 1261 members

There are 1 guests


Kevin has made 2503 posts

Top Posters:

metal450 - 178

Ragnar - 108

YikYak - 70

whiteorb - 49

Daisy - 35

Administrator: Kevin | Moderators: Kevin