Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Upgrading DNN P...Upgrading DNN P...'Host Settings' not available after upgrading from 5.6.3 to 6.0.1
Previous
 
Next
New Post
9/8/2011 7:20 PM
 
Hello,

I've performed a successful upgrade (no errors) from 5.6.3 to 6.0.1
Now en exception happens when I browse to Host > Host Settings.
It's not this problem: http://www.dotnetnuke.com/Resources/F...
There are no skin duplicates, and this is on the Host Settings, not Admin Settings. 

The exception is:

Error: Host Settings is currently unavailable. DotNetNuke.Services.Exceptions.ModuleLoadException: An item with the same key has already been added. ---> System.ArgumentException: An item with the same key has already been added. at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource) at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add) at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 comparer) at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector) at DotNetNuke.Entities.Modules.ModuleControlController.GetModuleControlsByModuleDefinitionID(Int32 moduleDefID) at DotNetNuke.Modules.Admin.Host.HostSettings.BindData() at DotNetNuke.Modules.Admin.Host.HostSettings.OnLoad(EventArgs e) --- End of inner exception stack trace --


Any ideas?

Thanks,
Horacio.-
 
New Post
9/9/2011 8:31 AM
 
ive seen one other report of this but have no further information - i'd suggest attaching a debugger and seeing what the issue is and logging it at support.dotnetnuke.com

Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
New Post
9/9/2011 12:32 PM
 
Hi Cathal,

For now, the client decided to keep the site running on 5.6.3.
Later, when they decide to move to 6.x, I may have to do what you suggest. 

From the exception, what seems to be failing is this:
public static Dictionary<string, ModuleControlInfo> GetModuleControlsByModuleDefinitionID(int moduleDefID)
{
    return GetModuleControls().Where(kvp => kvp.Value.ModuleDefID == moduleDefID)
           .ToDictionary(kvp => kvp.Value.ControlKey, kvp => kvp.Value);
}

I really dislike linq, Specially when it fails. It's too cryptic (for me)...
"An item with the same key has already been added.". What could that mean on the give expression? I don't know, I'm too old to understand linq.
Duplicate ControlKeys?

Many thanks,
Horacio.-
 
New Post
9/9/2011 3:51 PM
 
yes, it means that it retrieves all the module controls and when it detects one's with a certain moduledefid it adds them to the list. the error is thrown because the same controlkey is used twice for the same moduledefid (probably two null values). Try running a query such as

"select count(*) as dupcount,moduledefid,controlkey,controltitle from dnn_modulecontrols group by moduledefid,controlkey,controltitle order by dupcount desc"

to see what the duplicate is and let us know what the results are.

Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
New Post
9/9/2011 3:52 PM
 
whoops, that query should not have controltitle as it's not evaluated as part of the linq statement, so instead try:

select count(*) as dupcount,moduledefid,controlkey from dnn_modulecontrols group by moduledefid,controlkey order by dupcount desc


Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Upgrading DNN P...Upgrading DNN P...'Host Settings' not available after upgrading from 5.6.3 to 6.0.1


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out