I'm not sure how we got into this state (our client could have edited the Dictionary, but it seems like they should not have been able to do so in a way that leads to an invalid state), but we had a duplicate entry in the Dictionary.We got an exception on the public pages where we were trying to access any Dictionary item and also in the admin where the dictionary items can be edited and created.
The following code gets called by umbraco.cms.businesslogic.Dictionary:
IRecordsReader dr = SqlHelper.ExecuteReader("Select id, [key] from cmsDictionary");
There were 2 records in cmsDictionary with the same key, so it makes sense that the exception (see below) was getting thrown. But is umbraco supposed to prevent dictionary items with the same name from being added? If so, how did this happen? If not, is there a bug that occurs when this happens? Has anyone else run into this problem? Not sure the proper protocol - should I open a case in Codeplex or should one post to this forum first?
Umbraco Version: 4.0.2.1 ASP.NET: 3.5 Windows 2003/IIS 6
Exception message: Item has already been added. Key in dictionary: 'Test' Key being added: 'Test'
Stack trace: at System.Collections.Hashtable.Insert(Object key, Object nvalue, Boolean add) at umbraco.cms.businesslogic.Dictionary.ensureCache() at umbraco.cms.businesslogic.Dictionary.DictionaryItem..ctor(String key) at umbraco.cms.businesslogic.Dictionary.get_getTopMostItems() at umbraco.presentation.settings.DictionaryItemList..ctor() at ASP.umbraco_settings_dictionaryitemlist_aspx..ctor() in c:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files\root\f0cfcf82\31793b9d\App_Web_dictionaryitemlist.aspx.a5729980.3lugigio.0.cs:line 0 at __ASP.FastObjectFactory_app_web_dictionaryitemlist_aspx_a5729980_3lugigio.Create_ASP_umbraco_settings_dictionaryitemlist_aspx() in c:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files\root\f0cfcf82\31793b9d\App_Web_dictionaryitemlist.aspx.a5729980.3lugigio.1.cs:line 0 at System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp, Boolean noAssert) at System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) at System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig) at System.Web.HttpApplication.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
Another odd thing I forgot to mention is that the duplicate dictionary item was not named 'Test' as the exception message indicated. After I deleted it from the cmdDictionary, I changed the application pool (republishing didn't seem to help), the error went away.
The problem occurred in different pools. It wasn't until after I deleted the duplicate entry in the DB and then switched the pool, that the error went away. It seemed that the changing the pool was the only way I could get the cache cleared.
Dictionary problem - duplicate entry
I'm not sure how we got into this state (our client could have edited the Dictionary, but it seems like they should not have been able to do so in a way that leads to an invalid state), but we had a duplicate entry in the Dictionary.We got an exception on the public pages where we were trying to access any Dictionary item and also in the admin where the dictionary items can be edited and created.
The following code gets called by umbraco.cms.businesslogic.Dictionary:
There were 2 records in cmsDictionary with the same key, so it makes sense that the exception (see below) was getting thrown. But is umbraco supposed to prevent dictionary items with the same name from being added? If so, how did this happen? If not, is there a bug that occurs when this happens? Has anyone else run into this problem? Not sure the proper protocol - should I open a case in Codeplex or should one post to this forum first?
Umbraco Version: 4.0.2.1
ASP.NET: 3.5
Windows 2003/IIS 6
Another odd thing I forgot to mention is that the duplicate dictionary item was not named 'Test' as the exception message indicated. After I deleted it from the cmdDictionary, I changed the application pool (republishing didn't seem to help), the error went away.
Is you site perhaphs sharing the application pool with another umbraco instance? Might want to seperate them into different pools.
Peter
The problem occurred in different pools. It wasn't until after I deleted the duplicate entry in the DB and then switched the pool, that the error went away. It seemed that the changing the pool was the only way I could get the cache cleared.
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.