YAFLogo

dk
  • dk
  • 55.4% (Neutral)
  • YAF Camper Topic Starter
12 years ago
I have an issue I couldn't find by Googling it. Here is my setup:

1. I have downloaded and installed YAF a couple of days ago. The latest version I believe.

2. I have created a few users

3. I created a new Group/Role for my users

4. I created a private forum for the users in my group only

5. My forum has "hide if no rights" check box checked

Everything works great. The forum stays hidden for everyone except users in my custom group, however once in a while something happens and my users are being kicked out of my custom group, thus losing their ability to see it.

I checked the group associations, they are unchecked for all the users that are supposed to be there, and were there a few minutes ago.

I check the check box against my role on "user roles" tab of a user profile, click save. This works for few minutes and then, next time I load the same "user roles" tab - the check box is not there and the user is not a member of that role anymore.

This is driving me nuts. Please advice.

Sponsor
tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 4.0.0 rc 2
12 years ago

I have an issue I couldn't find by Googling it. Here is my setup:

1. I have downloaded and installed YAF a couple of days ago. The latest version I believe.

2. I have created a few users

3. I created a new Group/Role for my users

4. I created a private forum for the users in my group only

5. My forum has "hide if no rights" check box checked

Everything works great. The forum stays hidden for everyone except users in my custom group, however once in a while something happens and my users are being kicked out of my custom group, thus losing their ability to see it.

I checked the group associations, they are unchecked for all the users that are supposed to be there, and were there a few minutes ago.

I check the check box against my role on "user roles" tab of a user profile, click save. This works for few minutes and then, next time I load the same "user roles" tab - the check box is not there and the user is not a member of that role anymore.

This is driving me nuts. Please advice.

Originally Posted by: dk 

Maybe the role update is not saved when you click save. Can you take a look at the Event Log if there are any exceptions thrown?

dk
  • dk
  • 55.4% (Neutral)
  • YAF Camper Topic Starter
12 years ago
Thanks for the reply.

I checked the log. There are only 5 records (fresh install) and none of them about saving roles or user profile.

The forum visibility and the role assignment is working for some time. Users can even post to that forum, however, once in a while they just stop seeing it, and sure enough when I check the user-role relation is not there.

I am using Windows 2008 Server, SQL Server 2008 64 bit. If this matters.

dk
  • dk
  • 55.4% (Neutral)
  • YAF Camper Topic Starter
12 years ago
The issue is still there. I am going to need some help since I just don't know what to do next.

Here is the first screen where I add a user to a Group (Role).

I check the checkbox and click Save button. I later can pull a list of users by the group and that user will be displayed. So this part seems to work, at least at the beginning.

dk
  • dk
  • 55.4% (Neutral)
  • YAF Camper Topic Starter
12 years ago
Here is the second screen. One of the users of my custom group logged in and can't see the forum that is visible only to the members of that group.

Sure enough, when we check the member profile - the only group shown to the user is "Registered". Our custom group is not there. See the attachment.

dk
  • dk
  • 55.4% (Neutral)
  • YAF Camper Topic Starter
12 years ago
I pulled the Users list again. And set the filter to the custom group. Sure enough the users that have logged in are missing from the group.

I believe is that something happens at the moment of the user log in that removes a user from the custom group.

dk
  • dk
  • 55.4% (Neutral)
  • YAF Camper Topic Starter
12 years ago
Another test:

1. I have assigned 4 users to my group.

2. Run the report with filter on my group, got my 4 users as a result

3. I clicked on "Sync all membership users"

4. Run the report with filter on my group, got my 0 (zero!) users as a result

It appears that the Sync removed the user-group association from the custom group. The Registered and Administrators groups are unaffected.

If Sync happens during the user log in - then we have found where the issue is.

tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 4.0.0 rc 2
12 years ago
Which yaf version are you using? Are you using an custom Membership Provider or the default one? Looks like an yaf solution integrated in a website or is it a standalone yaf installation?
dk
  • dk
  • 55.4% (Neutral)
  • YAF Camper Topic Starter
12 years ago

Your YAF.NET Version: 1.9.6.1 (Date: 3/17/2012).
The Latest Stable Version is: 1.9.5.5 Released 3/3/2011.
I have downloaded it from the repository and compiled from the source.

http://forum.yetanotherforum.net/yaf_postst14205_v1-9-6-1-New-Install-MSSQL-Foreign-Key-BBCode-Issue.aspx 

I have downloaded the fixed version and was able to proceed.

dk
  • dk
  • 55.4% (Neutral)
  • YAF Camper Topic Starter
12 years ago
I am not using a custom Membership provider.

The site is a stand alone install. I am using a Green-Gray skin.

dk
  • dk
  • 55.4% (Neutral)
  • YAF Camper Topic Starter
12 years ago

I pulled the Users list again. And set the filter to the custom group. Sure enough the users that have logged in are missing from the group.

I believe is that something happens at the moment of the user log in that removes a user from the custom group.

Originally Posted by: dk 

Now when I am thinking about it. The issue might be as well happening while a user is logging out. Since in my test I have logged in and out as a member, then logged in as an admin to get to reports.

dk
  • dk
  • 55.4% (Neutral)
  • YAF Camper Topic Starter
12 years ago
I hate to nag, but did you guys have a chance to look at this issue?
tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 4.0.0 rc 2
12 years ago

I hate to nag, but did you guys have a chance to look at this issue?

Originally Posted by: dk 

Sorry but i wasn't able to reproduce the problem.

Are there any Entries in the Event Log?

weinreich
12 years ago
I am having a similar problem. I have had a YAF-forum running for a loong time and wanted to get it updated. So I have made a copy of the database and is trying to get everything updated and running.

So I downloaded the latest source code and got the solution up and running. I went through with the update and everything looked good, but once I logged in problems started to occur.

When I log in the association between a user and a group gets deleted and then an error is thrown "Unable to find the Guest user". This seems to be a problem that other people have run into.

I have found that the associations are being deleted in the class RoleMembershipHelper.cs line 444:

// remove groups...

foreach (DataRow row in groupTable.AsEnumerable().Where(row => !roles.Contains(row["Name"].ToString())))

{

// remove since there is no longer an association in the membership...

LegacyDb.usergroup_save(userId, row["GroupID"], 0);

}

Now I have no clue why this would be done as it deletes all the associations a user has with groups. I am not sure what is going on here and I have not been able to track the problem further. I really just want to comment out the code above as I see no reason for this but as I am not nearly knowing enough about what is going on I am hesitant to do so.

Any advise?

bbobb
  • bbobb
  • 100% (Exalted)
  • YAF Developer
12 years ago
Make sure that you don't have a Guest user in your Membership. In this case YAF will remove it because Guest should not be in Ptoviders. Alternatively, you can rename Guest name, but unfortunately YAF still has a couple of places where it checked against "Guest" you should replace them with UserMembershipHelper Guest property, can't look right now how it's called exactly.