YAFLogo

dillegummin
14 years ago
Hi guys,

After upgrading to 1.9.5.5 beta I got a message from one of my admins that roles didn't really work anymore. When they changed the roles of members they did not get the new access rules attached to those roles even though the roles where checked when you went into the user admin on the user.

I thought it was a good idea to install the 1.9.5.5 RTW Release. Maybe it was a bug in the beta. But now I get a scary "Index was outside the bounds of the array." Exception when I try to enter the Roles page in the admin.

Any help would be very appreciated!!!

Sponsor
Jaben
  • Jaben
  • 100% (Exalted)
  • YAF Developer
14 years ago
What are your Roles Membership setting in your web.config?
Boskone
14 years ago
I am seeing the same error on one of my boards (BoardID=1)

ActiveTabName: Forum
RawURL: /tabid/55/g/admin_groups/admin_groups.aspx
AbsoluteURL: /Default.aspx
AbsoluteURLReferrer: http://dnn4.hmcomputers.local/tabid/55/g/admin_admin/admin_admin.aspx
UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.7) Gecko/20091221 Firefox/3.5.7 (.NET CLR 3.5.30729)
DefaultDataProvider: DotNetNuke.Data.SqlDataProvider, DotNetNuke.SqlDataProvider
ExceptionGUID: 2f562b39-faf9-4f18-9987-89156e5a6ce1
InnerException: Index was outside the bounds of the array.
FileName:
FileLineNumber: 0
FileColumnNumber: 0
Method: YAF.Controls.RoleRankStyles.Render
StackTrace:
Message: DotNetNuke.Services.Exceptions.PageLoadException: Index was outside the bounds of the array. ---> System.IndexOutOfRangeException: Index was outside the bounds of the array. at YAF.Controls.RoleRankStyles.Render(HtmlTextWriter writer)

The other boards using the same installation are working ok (BoardID=2, BoardID=3)


Boskone - A DotNetNuke user.

RDSCC 

Jaben
  • Jaben
  • 100% (Exalted)
  • YAF Developer
14 years ago
Thanks for the bug reports. I'll fix it.
dillegummin
14 years ago

What are your Roles Membership setting in your web.config?

Originally Posted by: Jaben 

Hi Jaben,

My web.config looks like this:


		<roleManager enabled="true" defaultProvider="YafRoleProvider">
			<providers>
				<clear/>
				<add connectionStringName="yafnet" applicationName="YetAnotherForum" name="YafRoleProvider" type="YAF.Providers.Roles.YafRoleProvider"/>
			</providers>
		</roleManager>
		<membership defaultProvider="YafMembershipProvider" hashAlgorithmType="MD5">
			<providers>
				<clear/>
				<add connectionStringName="yafnet" applicationName="YetAnotherForum" name="YafMembershipProvider" minRequiredPasswordLength="6" minRequiredNumericCharacters="0" minRequiredNonAlphanumericCharacters="0" requiresUniqueEmail="false" type="YAF.Providers.Membership.YafMembershipProvider"  hashHex="true" hashCase="upper"/>
			</providers>
		</membership>
		<profile enabled="true" defaultProvider="YafProfileProvider" inherits="YAF.Utils.YafUserProfile">
			<providers>
				<clear/>
				<add connectionStringName="yafnet" applicationName="YetAnotherForum" name="YafProfileProvider" type="YAF.Providers.Profile.YafProfileProvider"/>
			</providers>
		</profile>

dillegummin
14 years ago
Is there a quick fix I can do?

Jaben
  • Jaben
  • 100% (Exalted)
  • YAF Developer
14 years ago
Yes, the problem is the styles information isn't properly broken up into pairs for that role.

Edit your roles and just remove the style information for now.

Unless Bbobb can shed more light onto this system for a better temporary fix...

dillegummin
14 years ago
Hi guys,

Any estimate on when a fix will be available for this? I tried to open the ASP.NET Configuration from the YAF solution in Visual Studio on the server the forum is running but, I get an error message when I go into security, so I was unable to look at the Roles. Not really sure what you meant I was suppose to do Jaben.

My problem now is that the forum is used by a MMO guild. They have member trials and so on. They use Roles actively for giving access to (and revoking) different parts of the forum all the time. Now people that have failed trials and so on still have access to sections they shouldn´t and new members not getting access to the information they should. All in all they are having a hard time there now.

So anyone that could give me a tip on how I can be able to get Roles to work again? Or is there a new .dll that contains a fix I can get a hold of?

Boskone
14 years ago
I had to edit the database directly.

In the yaf_Group table, change anything in the "Style" column to NULL


Boskone - A DotNetNuke user.

RDSCC 

bbobb
  • bbobb
  • 100% (Exalted)
  • YAF Developer
14 years ago
Try this from admin area.

UPDATE yaf_Group SET Style='' WHERE Style IS NULL

UPDATE yaf_Rank SET Style='' WHERE Style IS NULL

and

UPDATE yaf_Group SET Style=NULL WHERE Style=''

UPDATE yaf_Rank SET Style=NULL WHERE Style=''

I'm not sure what happens. as I can't repeat it. But it'll help to find a solution.

dillegummin
14 years ago
Cheers guys!

That worked.

I ended up doing it in Microsoft SQL Server Management Studio because I still got the same error after running your commands from the admin area of the forum bbobb. Though the commands themselves worked.

So I just ran:


UPDATE [yafnet_huge].[dbo].[yaf_Group]
   SET [Style] = NULL
GO

in the management studio. Now there is no exception going into the roles anymore. :-d

dillegummin
14 years ago
The weird thing is that the most serious bug is still there. Even though I change a role on a member, this will not affect what the user get access to at all. Anyone else have this too?
bbobb
  • bbobb
  • 100% (Exalted)
  • YAF Developer
14 years ago

The weird thing is that the most serious bug is still there. Even though I change a role on a member, this will not affect what the user get access to at all. Anyone else have this too?

Originally Posted by: dillegummin 

The access data is a sort of cached. You should clear ActiveAccess table or save a role, as I'm rembering it should have a cleaning code.

About the error - I'm not getting the error because I use a different styles combination. There's a YAF.Controls assembly tagged as 1.9.5.6 in svn. You can download and replace it in your files. Jaben has made a fix for it in the version and the assembly should be compatible with 1.9.5.5 RTW .

dillegummin
14 years ago

The weird thing is that the most serious bug is still there. Even though I change a role on a member, this will not affect what the user get access to at all. Anyone else have this too?

Originally Posted by: bbobb 

The access data is a sort of cached. You should clear ActiveAccess table or save a role, as I'm rembering it should have a cleaning code.

About the error - I'm not getting the error because I use a different styles combination. There's a YAF.Controls assembly tagged as 1.9.5.6 in svn. You can download and replace it in your files. Jaben has made a fix for it in the version and the assembly should be compatible with 1.9.5.5 RTW .

Originally Posted by: dillegummin 

Thank bbobb.

Do you know when that clearing code is suppose to run? It´s not running when the user logs in or out at least. So I am a bit puzzled as to when the users will get their new access and not. Is it totally safe to clear the content of the ActiveAccess table?

bbobb
  • bbobb
  • 100% (Exalted)
  • YAF Developer
14 years ago

Is it totally safe to clear the content of the ActiveAccess table?

Originally Posted by: dillegummin 

Yes, it's simply a sort of cache - it will be filled again.