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...Administration ...Administration ...InnerException: An item with the same key has already been added.InnerException: An item with the same key has already been added.
Previous
 
Next
New Post
7/12/2012 5:41 PM
 

A customer of mine was adding modules and building out pagesand went to lunch.

He then came back and a bunch of modules were missing from several of his pages.  On these same pages he tried to add a new HTML module to the page and when the page refreshed, there was not HTML module onthe page.

I have seen this happen in the past when the same module with same module id gets added to the same page twice ,it can throw some errors.

When I look in the event viewer here is what I see.

All of these errors are showing the same error just withdifferent page names.

AssemblyVersion: 04.09.05

PortalID: -1
PortalName
UserID: -1
UserName
ActiveTabID: -1
ActiveTabName
RawURL: /MyECGCourse/Chapter10/tabid/138/Default.aspx
AbsoluteURL: /Default.aspx
AbsoluteURLReferrer: http://domainname.comMyECGCourse/Chap...
UserAgent: Mozilla/5.0 (Windows NT 5.1; rv:13.0) Gecko/20100101 Firefox/13.0.1
DefaultDataProvider: DotNetNuke.Data.SqlDataProvider,DotNetNuke.SqlDataProvider
ExceptionGUID: b6832ee0-9172-47b0-a0c9-981b33346877
InnerException: An item with the same key has already been added.
FileName
FileLineNumber: 0
FileColumnNumber: 0
Method: System.ThrowHelper.ThrowArgumentException
StackTrace
Message: System.ArgumentException: An item with the same key has already beenadded. at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value,Boolean add) atDotNetNuke.Entities.Modules.ModuleController.FillModuleInfoDictionary(IDataReaderdr)
Source
Server Name: server3

 
New Post
7/13/2012 4:11 PM
 
I recommend double checking the recycle bin just in case theres one with the same name there - however if there isnt you'll have to manually edit the "tabmodukes" table and remove the entry and then force an app recycle (e.g. via the tools menu, or edit the web.config to force it) - please log this as an error at support.dotnetnuke.com so we can add defensive coding to ensure it doesnt happen again.

Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
New Post
7/13/2012 4:16 PM
 
When you say just in case there is "one" with the same name.....what do you mean by "one"? A module? Module ID?

So what do you think happened?
 
New Post
7/13/2012 4:52 PM
 

I mean that based on your description it would seem that 2 duplicate tabid/moduleid modules may exist - try running the following against your database and see if any records are returned

SELECT tabid, moduleid
  FROM [TabModules]
  group by tabid,moduleid
  having count(*)>1


Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
New Post
7/13/2012 4:53 PM
 
sorry, i just noticed you're running 4.9.5 - thats a very, very old version - i highly recommend upgrading to a later release (e.g 5.6.8 or 6.2.1)

Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...InnerException: An item with the same key has already been added.InnerException: An item with the same key has already been added.


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