I've created several dictionary items in Umbraco and now they somehow have disappeared. They don't appear in the settings section anymore, but if I look into the database in the cmsDictionary table all the items appear to be there. Are dictionaries only stored in the database or is a part of it also on the file system? Anyone got an idea what might be wrong?
Items are cached and it could be that there went something wrong during load (or save) and then it could be that all items are not loaded. I've seen this once on an install of a client. The UmbracoLog table gave me info what went wrong.
I've looked at the error log, but the error doesn't give much information:
At /umbraco/webservices/TreeDataService.ashx?rnd=2188b3554bd74bd1a9d9412c1608df1e&id=-1&treeType=dictionary&contextMenu=true&isDialog=false&rnd2=88.7 (Referred by: http://localhost:56081/umbraco/umbraco.aspx#settings): ;
If I try to create a new Dictionary Item I get this error:
Server Error in '/' Application.
Item has already been added. Key in dictionary: 'Next' Key being added:
'Next'
Description:
An unhandled exception occurred during the execution of the current web
request. Please review the stack trace for more information about the error and
where it originated in the code.
Exception Details:
System.ArgumentException: Item has already been added. Key in dictionary:
'Next' Key being added: 'Next'
Source Error:
An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of the
exception can be identified using the exception stack trace below.
The error says that the dictionary item next is added multiple times in you database (that was exaclty the error we had). We deleted one record and restarted the app and that was a fix for us, hope it will work in your case also.
So check your DB for multiple records containing "Next"
I couldn't find a duplicate "Next" dictionary item, so I just deleted the only "Next" dictionary item, but that didn't help. Now I get the same exception, but with another dictionary item:
Server Error in '/' Application.
--------------------------------------------------------------------------------
Item has already been added. Key in dictionary: 'Base.CopyrightNotice' Key being added: 'Base.CopyrightNotice'
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.ArgumentException: Item has already been added. Key in dictionary: 'Base.CopyrightNotice' Key being added: 'Base.CopyrightNotice'
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[ArgumentException: Item has already been added. Key in dictionary: 'Base.CopyrightNotice' Key being added: 'Base.CopyrightNotice']
System.Collections.Hashtable.Insert(Object key, Object nvalue, Boolean add) +9360699
System.Collections.Hashtable.Add(Object key, Object value) +11
System.Collections.SyncHashtable.Add(Object key, Object value) +78
umbraco.cms.businesslogic.Dictionary.ensureCache() +384
umbraco.cms.businesslogic.DictionaryItem.hasKey(String key) +35
umbraco.dictionaryTasks.Save() +63
umbraco.presentation.create.dialogHandler_temp.Create(String NodeType, Int32 TypeId, Int32 NodeId, String Text) +619
umbraco.presentation.create.dialogHandler_temp.Create(String NodeType, Int32 NodeId, String Text) +48
umbraco.cms.presentation.create.controls.simple.sbmt_Click(Object sender, EventArgs e) +234
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +118
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +112
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5563
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1
Yes I've changed the web.config and the exception still appears. There are some empty rows in the cmsLanguageText table, but that's because not all fields are translated yet. The cmsDictionary table has no empty rows.
Even after restoring an older database (which used to work) I still get this exception... Will try to restore to an even older database (without dictionaries) to see if that works...
Dictionary items disappeared
Hello,
I've created several dictionary items in Umbraco and now they somehow have disappeared. They don't appear in the settings section anymore, but if I look into the database in the cmsDictionary table all the items appear to be there. Are dictionaries only stored in the database or is a part of it also on the file system? Anyone got an idea what might be wrong?
Jeroen
Since I still can't edit my first post I'd like to add that I'm using Umbraco 4.5.2.
Jeroen
Hi Jeroen,
Items are cached and it could be that there went something wrong during load (or save) and then it could be that all items are not loaded. I've seen this once on an install of a client. The UmbracoLog table gave me info what went wrong.
Cheers,
Richard
I've looked at the error log, but the error doesn't give much information:
If I try to create a new Dictionary Item I get this error:
The name of the dictionary item was "DigiTest" which doesn't exist yet. The "Next" key is the first row in the cmsDictionary table.
If I try to use umbraco.library:GetDictionaryItem with an item that exists in the database I still get nothing back.
What could be wrong?
Jeroen
Hi Jeroen,
The error says that the dictionary item next is added multiple times in you database (that was exaclty the error we had). We deleted one record and restarted the app and that was a fix for us, hope it will work in your case also.
So check your DB for multiple records containing "Next"
Cheers,
Richard
I couldn't find a duplicate "Next" dictionary item, so I just deleted the only "Next" dictionary item, but that didn't help. Now I get the same exception, but with another dictionary item:
Still no luck :(.
Jeroen
And you already restarted the site? could it be that there is an empty dictionary item in your db?
Yes I've changed the web.config and the exception still appears. There are some empty rows in the cmsLanguageText table, but that's because not all fields are translated yet. The cmsDictionary table has no empty rows.
Jeroen
Even after restoring an older database (which used to work) I still get this exception... Will try to restore to an even older database (without dictionaries) to see if that works...
Jeroen
After 2 months I now have the same exception again on a different website:
Anyone else had this before?
Jeroen
And now it happend on a third website. Any help would be really appreciated!
Jeroen
In this third situation I found a duplicate item. After deleting it and recycling the AppPool the dictionary items work again :).
Jeroen
Yes, duplicate dictionaryitems! Just track down the duplicate, remove it and all should be ok again :-)
is working on a reply...