YAFLogo

DavidT
  • DavidT
  • 54.8% (Neutral)
  • YAF Forumling Topic Starter
13 years ago
I've just setup YAF on a DotNetNuke website for the first time, on a new and clean DNN installation.

Everything has been going fine, changed password, install from site as Host worked fine but then when visiting the installed page for the first time it says:

Quote:

A critical error has occurred.
String cannot be of zero length. Parameter name: oldValue



The Log shows this:

Quote:

ModuleId: 386
ModuleDefId: 120
FriendlyName: Forums
ModuleControlSource: DesktopModules/YetAnotherForumDotNet/YafDnnModule.ascx
AssemblyVersion: 5.6.0
PortalID: 0
PortalName: Kotelva
UserID: 1
UserName: Webmaster
ActiveTabID: 64
ActiveTabName: Forums
RawURL: /Forums.aspx
AbsoluteURL: /Default.aspx
http://www.kotelva.org/default.aspx 
UserAgent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-GB; rv:1.9.1.7) Gecko/20091221 Firefox/3.5.7 GTBDFff GTB7.0
DefaultDataProvider: DotNetNuke.Data.SqlDataProvider, DotNetNuke.SqlDataProvider
ExceptionGUID: d76e3e97-8378-4280-ab6e-7ba3f3ff785f
InnerException: The user 'Webmaster' is already in role 'Administrators'.
FileName:
FileLineNumber: 0
FileColumnNumber: 0
Method: System.Web.Security.SqlRoleProvider.AddUsersToRolesCore
StackTrace:
Message: DotNetNuke.Services.Exceptions.ModuleLoadException: The user 'Webmaster' is already in role 'Administrators'. ---> System.Configuration.Provider.ProviderException: The user 'Webmaster' is already in role 'Administrators'. at System.Web.Security.SqlRoleProvider.AddUsersToRolesCore(SqlConnection conn, String usernames, String roleNames) at System.Web.Security.SqlRoleProvider.AddUsersToRoles(String[] usernames, String[] roleNames) at System.Web.Security.Roles.AddUserToRole(String username, String roleName) at YAF.DotNetNuke.YafDnnModule.CreateNewBoard(UserInfo dnnUserInfo, MembershipUser dnnUser) at YAF.DotNetNuke.YafDnnModule.DotNetNukeModule_Load(Object sender, EventArgs e) --- End of inner exception stack trace ---



I'm not a programmer but this looks to me like a bug.

I always create the initial host account as 'Webmaster'. I set the 'Admin' user as the administrator of the forums. Is there some way to fix this?
Sponsor

Jaben
  • Jaben
  • 100% (Exalted)
  • YAF Developer
13 years ago
Yep, looks like an issue to me as well. tha_watcha... can you confirm?
tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 3.0.3
13 years ago
Originally Posted by: Jaben 

Yep, looks like an issue to me as well. tha_watcha... can you confirm?



Looks like it, strangly there is a check in Code that should take care of it

// Add new admin users to group
            if (!Roles.IsUserInRole(dnnUserInfo.Username, "Administrators"))
            {
                Roles.AddUserToRole(dnnUserInfo.Username, "Administrators");
            }

and i wasnt able to reproduce the error yet. Have to investigate on that...
DavidT
  • DavidT
  • 54.8% (Neutral)
  • YAF Forumling Topic Starter
13 years ago
Is there anything else I can do to help identify the problem?

It was a completely new install of DNN v5.6, no other modules added, and then the latest DNN-YAF installed.

Running on Windows Server 2003, IIS6, SQL Server 2008 Web.
tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 3.0.3
13 years ago
Quote:

I always create the initial host account as 'Webmaster'. I set the 'Admin' user as the administrator of the forums. Is there some way to fix this?



What happen when you select the Webmaster as Admin in Install Wizard?
DavidT
  • DavidT
  • 54.8% (Neutral)
  • YAF Forumling Topic Starter
13 years ago
I've not tried any other combinations, just did a normal clean install as usual with separate Host/Webmaster and Admin accounts.

Do you want me to go through different clean installs with different account names/combinations and then try installing and setting up YAF?
tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 3.0.3
13 years ago
Originally Posted by: DavidT 

I've not tried any other combinations, just did a normal clean install as usual with separate Host/Webmaster and Admin accounts.

Do you want me to go through different clean installs with different account names/combinations and then try installing and setting up YAF?[/quote

I am Currently not sure if there is a problem in the logic. I think the error should be gone when you open the page the second thime

The Way i tested is..

1. Install Module as Host,
2. Run Yaf Installer choose a user as admin i tested with a dnn host or dnn admin user.
3. Open The new YAF Page as Host

P.S: Just a note all DNN Host User Accounts are also set as YAF Host Account, and All DNN Admin Users are YAF Admin Users

DavidT
  • DavidT
  • 54.8% (Neutral)
  • YAF Forumling Topic Starter
13 years ago
This all seems running fine. Not sure on the error that happened before, seems to be the use of an existing user that's already Admin.

The problem that followed was the oldValue thing as I've seen others have had too. Just adding a Title to the page did the trick, though it was YAF v1.95.4140 and someone has said it was fixed in v1.95.1
astreib
  • astreib
  • 51.8% (Neutral)
  • YAF Forumling
13 years ago
I am having a very similar problem. I installed YAF in my DNN installation, everything seemed to go well, and when I added the module to a page I was prompted through setting up the Forum (name, time zone, etc). I selected use an existing user as Admin, and entered 'admin' for the user name. When I clicked Finish on the wizard I was logged out. Coming back in to the site I have this in the Event Log:


DefaultDataProvider: DotNetNuke.Data.SqlDataProvider, DotNetNuke.SqlDataProvider
ExceptionGUID: 852033c1-7ced-4862-8dd2-4690c8cc75fa
InnerException: String cannot be of zero length. Parameter name: oldValue
FileName:
FileLineNumber: 0
FileColumnNumber: 0
Method: System.String.Replace
StackTrace:
Message: DotNetNuke.Services.Exceptions.PageLoadException: String cannot be of zero length. Parameter name: oldValue ---> System.ArgumentException: String cannot be of zero length. Parameter name: oldValue at System.String.Replace(String oldValue, String newValue) at YAF.DotNetNuke.YafDnnModule.Forum1_PageTitleSet(Object sender, ForumPageTitleArgs e) at YAF.Forum.FirePageTitleSet(Object sender, ForumPageTitleArgs e) at YAF.Modules.PageTitleModule.GeneratePageTitle() at YAF.Modules.PageTitleModule.ForumPage_Load(Object sender, EventArgs e) at System.EventHandler.Invoke(Object sender, EventArgs e) at System.Web.UI.Control.OnLoad(EventArgs e) at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) --- End of inner exception stack trace ---
Source:


EDIT: This was preceded by this error:



DefaultDataProvider: DotNetNuke.Data.SqlDataProvider, DotNetNuke.SqlDataProvider
ExceptionGUID: 0ed7eb53-73d1-4a87-bc95-d3fd8f9556ce
InnerException: The user 'host' is already in role 'Registered'.
FileName:
FileLineNumber: 0
FileColumnNumber: 0
Method: System.Web.Security.SqlRoleProvider.AddUsersToRolesCore
StackTrace:
Message: DotNetNuke.Services.Exceptions.ModuleLoadException: The user 'host' is already in role 'Registered'. ---> System.Configuration.Provider.ProviderException: The user 'host' is already in role 'Registered'. at System.Web.Security.SqlRoleProvider.AddUsersToRolesCore(SqlConnection conn, String usernames, String roleNames) at System.Web.Security.SqlRoleProvider.AddUsersToRoles(String[] usernames, String[] roleNames) at YAF.Classes.Core.RoleMembershipHelper.AddUserToRole(String username, String role) at YAF.Classes.Core.RoleMembershipHelper.SetupUserRoles(Int32 pageBoardID, String userName) at YAF.DotNetNuke.YafDnnModule.CreateYafUser(UserInfo dnnUserInfo, MembershipUser dnnUser) at YAF.DotNetNuke.YafDnnModule.DotNetNukeModule_Load(Object sender, EventArgs e) --- End of inner exception stack trace ---
astreib
  • astreib
  • 51.8% (Neutral)
  • YAF Forumling
13 years ago
OK think I resolved it. The code that's blowing up is in YafDnnModule.ascx.cs:



        private void Forum1_PageTitleSet(object sender, ForumPageTitleArgs e)
        {
            this.BasePage.Title = this.BasePage.Title.Replace(this.PortalSettings.ActiveTab.Title, string.Empty);
        }


Sure enough, the page that my module was on had been added with the "Common Tasks" panel in the ribbon bar, which sets a page name but not a title. When I gave the page a title, now the forum module appears!
cagliostro
13 years ago

I think this is resolved in the latest beta version of YAF / YAFforDNN.


YAF Logo Copyright © YetAnotherForum.NET & Ingo Herbote. All rights reserved
About Us

The YAF.NET is an open source .NET forum project. YAF.NET is supported by an team of international developers who are build community by building community software.

Powered by Resharper Donate with PayPal button